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 : User Choices and Prompts:
If the user enters Jogging:
Prompt:
Enter the time spent jogging in minutes:
Read the duration as input.
Calculate calories burned using the formula: Calories duration
Print:
Calories burned: followed by the calculated value, followed by a newline.
If the user enters Cycling:
Prompt:
Enter the time spent cycling in minutes:
Read the duration.
Calculate calories burned using: Calories duration
Print the result as above.
If the user enters Swimming:
Prompt:
Enter the time spent swimming in minutes:
Read the duration.
Calculate calories burned using: Calories duration
Print the result as above.
If the user enters Quit:
Print:
Program ending.
Valid menu choices are or If invalid, print:
Valid choices are through Try again.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
