Question
You are starting a twelve week program training to compete in a triathlon. The triathlon consists of three athletic events, 1.5 k swim, 40k bike,
You are starting a twelve week program training to compete in a triathlon. The triathlon consists of three athletic events, 1.5 k swim, 40k bike, 10k run. In order to be prepared for the competition you want to print a training schedule. Starting with week 1 you will increase the distance of each activity so that you reach the race distance by week twelve. Due to rounding, you may be just under or over, and thats okay. Display output to 2 decimal places. Since you want your program to be flexible, the program should the prompt for the athletes name and current level of each activity. Also allow the user to continue to enter training information for athletes until they say no to the question do you want to enter another.
Use python to write the program to perform this task I suggest you write it in pieces, first make sure you can get one activity to loop properly, then add the other two (theyre mostly the same, with a few changes). Finally add the loop that allows you to loop until finished. Use the pseudocode to guide you, work in steps, give yourself plenty of time You MUST use both a for loop and a while loop Prompt the user for their starting ability for each event measured in kilometers (k). The maximum distance for each event is 1.5 swim, 40k bike, 10k run. Star the increase at week one and increase each events distance for twelve weeks ending at (or around) the maximum for each event Display the output to 2 decimal places and lined up nicely Sample run of the program might look like this o notice float values, not integers o notice nicely aligned and personalized output Continued to the next page-------------->
o all of the variables should have meaningful names o include comments in your code comment at the top should be your name, course, section and program name Include three additional comments that clarify your code the pseudocode make good comments! o display the output as shown above in the sample run o save the file lastname_ch4TrainingProgram o You are responsible for properly submitting the code file, not the run of the code file to chapter 4 assignment dropbox
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