Fill This Form To Receive Instant Help
Homework answers / question archive / Exam #1 Write a program for a library: – We check in a customer named John Smith
Exam #1
B. Print out all the variables
– print(course[-1])
– another=course[:]
– print(another)
The comments show what you should see as output when everything is debugged:
This program demonstrates a solution to the Fat Gram Calculator programming challenge.
fatCalories = fatGrams * 9
fatPercentage = fatCalories / calories
When debugged, calories of 100 and fat grams of 10 should display percentage of calories from fat is 90.0%
int calories = 0.0 # Number of calories
int fat_grams = 0.0 # Number of fat grams
int fat_calories = 0.0 # Calories from fat
float fat_percentage = 0.0 Percentage of fat calories
#Get the number of calories.
print("How many calories does the food have? ")"
calories = input()
#Get the number of fat grams.
fat_grams = ("How many fat grams does the food have? ");
#calculate the fatCalorie
fat_grams = fat_calories * 9
#Calculate percentage of calories from fat.
fat_percentage = fatCalories / fatGrams;
#display the results
print("The percentage of calories from fat is %i%" fat_percentage * 100) + "%.)
Submit the debugged DebuggedFatGrams.py file in Canvas under the Exam #1 link. You need to include the screenshot showing the Python file and correct testing results.