
Andrew K.
asked 12/18/20Write a Python program that calculate the amount of dried fruit and nuts per student.
In an elementary school, a mixture of equal amounts of nuts and dried fruit is provided during lunch. Suppose that the number of calories in each pound of nuts is 0.70 times the number of calories in each pound of dried fruit. Write a program that prompts the user to input the number of students in the elementary school, the number of calories required for each student from the mixture, and the number of calories in each pound of nuts. The program outputs the amount of nuts and dried fruit needed for the students. (For simplicity, assume that each student requires the same amount of calories).
1 Expert Answer

Patrick B. answered 12/20/20
Math and computer tutor/teacher
"""
num_students * calorie_requirement = 1.7 * num_calories * num_pounds
"""
num_students = input("Please input # of studemnts :>")
calorie_req = input("Please input calorie requirement:>")
num_calorie = input('Please input # of calories in 1 lb. of nuts:>')
num_pounds = int(num_students)*int(calorie_req)/(1.7*int(num_calorie))
print(" # of students = " + str(num_students))
print(" calorie requirements = " + str(calorie_req))
print(" # of calories in 1 lb. of nuts = " + str(num_calorie))
print(" # of pounds needed = " + str(num_pounds))
Still looking for help? Get the right answer, fast.
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.
Patrick B.
source code uploaded to RESOURCES section under this link12/20/20