Can you please show how I would write the program out thanks
Can you please show how I would write the program out? thanks! please so all work
The number of calories burned per hour by cycling, running, walking, and swimming are 200, 475, 175, and 275, respectively. A person loses 1 pound of weight for each 3, 600 calories burned. Write a program to request the number of hours spent at each activity and then display the number of pounds worked off. Expected Sample Output: >>> runfile(\'/Users/onsayse/CSE201_F16/HOMEWORK/Homework3/problem3.py\', wdir=, /Users/onsayse/CSE201_F16/HOMEWORK/Homework3\') Enter number of hours cycling: 2 Enter number of hours running: 3 Enter number of hours swimming: 1 Weight loss: 0.6 pounds >>>Solution
Python2.7 program for the problem:
print \"Enter number of hours cycling\"
t_cycling = float(raw_input())
print \"Enter number of hours running\"
t_running = float(raw_input())
print \"Enter number of hours walking\"
t_walking = float(raw_input())
print \"Enter number of hours swimming\"
t_swimming = float(raw_input())
Total_calories_burn = t_cycling*200.0 + t_running*475.0 + t_swimming*275.0 + t_walking*175.0
weight_loss = Total_calories_burn/3600.0
print \"Weight loss \",weight_loss ,\"Pounds\"
Sample output:
Enter number of hours cycling
2
Enter number of hours running
2
Enter number of hours walking
2
Enter number of hours swimming
2
Weight loss 0.625 Pounds
