00:01
Okay, this question says, create a python program that prompt the user to enter the names and finish times of three competitors in a race.
00:10
Based on finish times, your program will then determine and print who won gold, silver, and bronze.
00:17
Reject any times less than or equal to zero and continue to prompt until a valid input has been entered.
00:24
Okay, so let's do it.
00:26
Let's say n1 is input.
00:32
The first racer, racer, and then t1 is going to be input, enter the first racer's time.
00:46
I'll do n2 is input, enter the second racer, and t2 is going to be input, enter the second racer's time.
01:02
T3 is going to be input.
01:05
Enter the third racer, end.
01:08
Sorry, that's n3.
01:11
And t3 is going to be input.
01:15
T3 equals input.
01:19
Enter the third racers time.
01:26
And we're going to say, while t1 is greater than zero, we're going to ask for this, and we're going to start off by saying t1 equals zero.
01:37
And we're going to do a similar structure here for these other times because we want them to have to enter something greater than 0.
01:51
3.
01:54
3.
01:56
And we're going to convert these to floats because otherwise that won't make any sense.
02:04
That's a float.
02:06
Float.
02:07
This is a float.
02:10
Okay.
02:11
And we're going to say if p3 allows.
02:18
Less than or equal to zero print enter a valid time and let's copy this to the other one next we're going to say if t1 greater than t2 and t1 greater than t3 print or we'll say um say metals is equal to a list and we'll loop now we'll say if this is true, then, no, we're going to say, if this is true, then gold equals n1.
03:26
Then we're going to say if t1 greater than t2 and t1 less than t3, then gold equals t3 and silver equals t1.
03:47
If t1 less than t2 and t1 less than t3, bronze equals, sorry, n1, which would be n's here...