ron-nutrition-calculator-_personal

By ron liu

This writing is talking about nutrition aclculator. Which is one of our Main project of this semester. I'm going to talk about why we do this, how the function works, how I solve the problem and how I learn, also explain our project in this semester.

Our biggest project of this semester is about space and we need to find the easiest food to bring in the space. so we decide to bring smoothie but we have some problem with calculating the amount of smoothie so we decide to calculate fried rice first because is easier, after we learn how to calculate fried rice to calculate smoothie.

Now I'm going to talk about How the function works. We use class to organize our nutrition and we also have new ingredient part of calculation and we have our calculator function for calculate all the Ingredient and we use printer to print out human readable things.

When we doing the nutrition calculator there are many problems it is also one of the hardest code we have ever do. but we can look at each others wiki page to find out the problem and learn from each other, but it doesn't mean like fully copy their code because we might have different function name and copy it just not a way to learn and I also learn a new things If we use someone else code or thing we have to put their name in the code so that people can know this is from other people's, If our function does not work we also need to put a note so that teacher or someone else can know this function has a problem and we don't have to wasted each others time.

After talking about our nutrition calculator. How the function works, how I solve the problem and how I learn. I think this is the hardest thing we have ever learn, The first time I learn this I thought I could never understand because it just extremely hard, but after all I finally know it, This function can also use it in future if we need to calculate anything we can just use this types of code and change something to get what we want, this also helps we to learn one thing can use in different situation just need to think more. After all I think everyone should learn some basic coding skills because it is very important.

VM33:141 the name of this dish is  fried rice
VM33:142 the total amount of protein is  8.5884
VM33:143 the total amount of carb is  50.4852
VM33:144 the total amount of fat is  9.7444
VM33:145 the total amount of fiber is  2.4268
VM33:146 the total amount of iron is  2.652
VM33:147 the total amount of sodium is  673.26
VM33:148 the total amount of calcium is  59.324000000000005
VM33:149 the total amount of vitaminD is  0.36640000000000006
VM33:150 the total amount of calories is  342.53200000000004
VM33:151 the total amount of weight is  262.65
{name: 'fried rice', protein: 8.5884, carb: 50.4852, fat: 9.7444, fiber: 2.4268, …}
VM885:146 the name of this dish is  smoothie
VM885:147 the total amount of protein is  37.9
VM885:148 the total amount of carb is  136.3
VM885:149 the total amount of fat is  44.425
VM885:150 the total amount of fiber is  12.600000000000001
VM885:151 the total amount of iron is  0.9
VM885:152 the total amount of sodium is  516.05
VM885:153 the total amount of calcium is  1227.4499999999998
VM885:154 the total amount of vitaminD is  9.425
VM885:155 the total amount of calories is  1074.75
VM885:156 the total amount of weight is  1475
VM885:146 the name of this dish is  smoothie
VM885:147 the total amount of protein is  7.5
VM885:148 the total amount of carb is  61.4
VM885:149 the total amount of fat is  5.65
VM885:150 the total amount of fiber is  4.999999999999999
VM885:151 the total amount of iron is  39.4
VM885:152 the total amount of sodium is  67.4
VM885:153 the total amount of calcium is  186.49999999999997
VM885:154 the total amount of vitaminD is  1.9500000000000002
VM885:155 the total amount of calories is  301.5
VM885:156 the total amount of weight is  650
VM885:146 the name of this dish is  smoothie
VM885:147 the total amount of protein is  5.750000000000001
VM885:148 the total amount of carb is  108.7
VM885:149 the total amount of fat is  4.35
VM885:150 the total amount of fiber is  8.2
VM885:151 the total amount of iron is  20.15
VM885:152 the total amount of sodium is  48.45
VM885:153 the total amount of calcium is  143
VM885:154 the total amount of vitaminD is  1.3
VM885:155 the total amount of calories is  456
VM885:156 the total amount of weight is  600

Smoothie 1

calcium: 83.21694915254236
calories: 72.86440677966101
carb: 9.240677966101696
fat: 3.0118644067796607
fiber: 0.8542372881355933
iron: 0.061016949152542375
name: "smoothie"
protein: 2.5694915254237287
sodium: 34.9864406779661
vitaminD: 0.6389830508474577
weight: 100

smoothie 2

calcium: 28.69230769230769
calories: 46.38461538461539
carb: 9.446153846153846
fat: 0.8692307692307694
fiber: 0.7692307692307692
iron: 6.061538461538461
name: "smoothie"
protein: 1.153846153846154
sodium: 10.369230769230771
vitaminD: 0.30000000000000004
weight: 100

Smoothie 3

calcium: 23.833333333333332
calories: 76
carb: 18.116666666666667
fat: 0.7249999999999999
fiber: 1.3666666666666665
iron: 3.358333333333333
name: "smoothie"
protein: 0.9583333333333335
sodium: 8.075
vitaminD: 0.21666666666666667
weight: 100
  • ron-nutrition-calculator-_personal.txt
  • Last modified: 2022/06/22 01:01
  • by ron.liu