Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote