CALORIES FROM FAT AND CARBOHYDRATES A nutritionist who works for a fitness club
ID: 3542638 • Letter: C
Question
CALORIES FROM FAT AND CARBOHYDRATES
A nutritionist who works for a fitness club helps members by evaluating their diets. As per of her evaluation, she asks members for the number of fat grams and carbohydrate grams that they consumed in a day. Then ,she calculates the number of calories that result from fat, using the following formula.
calories from fat = fat grams * 9
next, she calculates the number of calories that result from the carbohydrates, using the following formula.
calories from carbs=carb grams 8* 4
the nutritionist asks you to design a modular program that will make these calculations.
need to run this progemm on python
Explanation / Answer
f=input("number of fat grams:")
c=input("number of carbohydrate grams:")
print"calories from fat : "
print f*9
print"calories from carbohydrate : "
print c*8*4
#check the output at http://ideone.com/pSsvmr
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.