Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Options Futures And Other Derivatives

Authors: John C. Hull

7th Edition

0136015867, 9780136015864

More Books

Students also viewed these Finance questions

Question

Mark to market the position.

Answered: 1 week ago