Question: Develop a program for a fitness activity tracker that displays a menu for different types of physical activities. The program will calculate and display the

Develop a program for a fitness activity tracker that displays a menu for different types of physical activities. The program will calculate and display the estimated calories burned for that activity based on the user's choice.
Menu Structure:
Jogging
Cycling
Swimming
Quit
Enter your choice (1-4): User Choices and Prompts:
If the user enters 1(Jogging):
Prompt: "
Enter the time spent jogging in minutes: "
Read the duration as input.
Calculate calories burned using the formula: Calories =0.75* duration
Print: "
Calories burned: ", followed by the calculated value, followed by a newline.
If the user enters 2(Cycling):
Prompt: "
Enter the time spent cycling in minutes: "
Read the duration.
Calculate calories burned using: Calories =0.5* duration
Print the result as above.
If the user enters 3(Swimming):
Prompt: "
Enter the time spent swimming in minutes: "
Read the duration.
Calculate calories burned using: Calories =0.8* duration
Print the result as above.
If the user enters 4(Quit):
Print: "
Program ending.
" Valid menu choices are 1,2,3, or 4. If invalid, print: "
Valid choices are 1 through 4. Try again.
"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!