Question
The purpose of this assignment is to introduce students to the software/program development process and to work effectively with other programmers to develop useable programs.
The purpose of this assignment is to introduce students to the software/program development process and to work effectively with other programmers to develop useable programs. Specifically this program will demonstrate the use of taking user input, performing a while loop and displaying the output.
Your friend wants to start training for a marathon. They will be entering 5K, 10K, and 15K races over the next year and want to periodically calculate their runs. For this program, we want a simple program where your friend can enter their times on a series of short 5K runs. They want a program to tell them the number of days they ran, the total minutes they ran, the average time of all runs, and the average minutes per kilometer that they ran. The program should ask for the time in minutes of each run and continue to take input until all runs are entered. Then the program should print the information requested.
Implementation
Create a python program that demonstrates input, while loop, and print. The program should:
1 Ask the user for input in minutes (whole numbers) and stop asking for input when the user enters without input.
2 Calculate the number of days ran (count), the total number of minutes ran (sum), average minutes per run (sum/count), and the average kilometer per minute (sum/count/5).
3 Provide the output of the number of runs, total minutes, the average time in minutes, and average minutes per kilometer.
\begin{tabular}{|l|l|l|l|l|} \hline Minutesper5Krunentered & #ofdaysyouranthe5K & Totalnumberofminutesyouran & Averageminutesper5Krun & Averagekilometerperminute \\ \hline 32 & 4 & 155 & 38.75 & 7.75 \\ 45 & & & & \\ 41 & 3 & 116 & 38.67 & \\ 37 & & & & \\ \hline 34 & 5 & & & \\ 55 & & & & \\ 27 & & & & \\ \hline 35 & & & & \\ 32 & & & & \\ 37 & & & & \\ 31 & & & & \\ 38 & & & & \\ \hline \end{tabular}Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started