5.6 (Part 1) Calories from Fat and Carbohydrates - Python
Starting out with Python, Third Edition, Tony Gaddis
Chapter 5
Programming Challenges
- Calories from Fat and Carbohydrates
A nutritionist who works for a fitness club helps members by evaluating their diets. As part 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 the fat, using the following formula:
calories from fat = fat grams x 9
Next, she calculates the number of calories that result from the carbohydrates, using the following formula:
calories from carbs = carb grams x 4
The nutritionist asks you to write a program that will make these calculations.
Starting out Python. Third Edition. Tony Gaddis.
Happy Steeming Everyone! :)
very easy, but it is difficult to do, post i like
Hi noeva, practice makes perfect so don't fret at all. Keep at it and you'll be a pro in no time :)
Yas, thank's you @kakradetome