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 that’s okay. Display output to 2 decimal places. Since you want your program to be flexible, the program should the prompt for the athlete’s 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”.
Pseudocode (10 points)
Start with a pseudocode (10 points). Write the pseudocode in English, step by step what you need to do to solve the problem. No flowchart is required, but you can certainly draw one if it helps you. o create the pseudocode document in using Microsoft Office Word o Work out the math--SHOW YOUR WORK IN THE PSEUDOCODE o D2L has directions on how to download Office if you don’t have it. o put your name, date, section, and description of the program at the top of the page o name the file lastname_ch4TrainingPseudocode o submit to the chapter 4 assignment dropbox Python Program (50 points)
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 (they’re 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 event’s 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
>>>>>>>>>>>>>>>>>>>>>>>>>>>keep track of identation>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


python code:
while True:
print ("Welcome traithlon training program ")
name=input("Please Enter your name: ")
swimD=float(input("what is your current swim distance
is measured in K ?"));
bike=int(input("what is your current bike distance is
measured in K ?"));
run=int(input("what is your current run distance is
measured in K ?"));
print("Training program for "+name);
print("week
swim bike
run
(measured
in k)");
print("----------------------------------------------------------------");
swimdiff=(1.50-swimD)/12;
bikediff=(40-bike)/12;
rundiff=(10-run)/12;
for i in range(1,13):
swimD=swimdiff+swimD;
bike=bikediff+bike;
run=rundiff+run;
print("{}
{:.2f}
{:.2f}
{:.2f}".format(i,swimD,bike,run))
print("----------------------------------------------------------------");
print("do you want calculate another traing
program");
c=input("yes or no");
if(c.lower()!='yes'):
break
You are starting a twelve week program training to compete in a triathlon. The triathlon consists...