Hello, “”Create a Python program that prompts a user to enter the names and finish times of three competitors in a race. Based on the finish times, your program will then determine and print who won the gold, silver, and bronze medals. Your program should reject any entered times less than or equal to zero by continuing to prompt for new input until a valid time has been entered”” You will find in this image the program I wrote. So, I would like you to see what improvements, if so, I could make to my program please. Thank you.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
icon
Concept explainers
Question
100%
Hello, “”Create a Python program that prompts a user to enter the names and finish times of three competitors in a race. Based on the finish times, your program will then determine and print who won the gold, silver, and bronze medals. Your program should reject any entered times less than or equal to zero by continuing to prompt for new input until a valid time has been entered”” You will find in this image the program I wrote. So, I would like you to see what improvements, if so, I could make to my program please. Thank you.
group project5.py- C:/Users/user/AppData/Local/Programs/Python/Python39/group project5.py (3.9.1)
File Edit Format Run Options Window Help
#python program about the racewinner
namel - input ("Please, enter the name of the first runner : ") #display a message for the user and put it into namel
" + namel +" 's time (in minutes) :")) #display message for user and keep it into timel, time spent by the first runner during
while (timel <= 0): #while loop as long as the timel is negative
print ("Invalid time entry. Try again")
= int (input ("please enter " + namel +" 's time (in minutes) : ""))
name2 = input ("please, enter the name of the second runner: ") #display message for the user and put it into name2
time2 = int (input ("please enter "+ name2 +" 's finish time (minutes)
while time2 <- 0 : #while loop as long as the time2 is negative
: ")) #display message for user and keep it into time2 (time2 time spent by the second ru
print ("invalid time entry. Try again")
time2 = int (input ("please enter "+ name2 +" 's finish time (minutes): "))
name3 = input ("please, enter the name of the third runner : ") #display a message for the user and put it into name3
time3 = int (input ("please enter "+ name3 +" 's finish time (in minutes) : "))
while time 3 <= 0:
print ("invalid time entry. Try again")
time3 - int (input ("Please enter "+ name 3 +" 's finish time (in minutes)
#display message for user and keep it into time2 (time 3 time spent by the third
#while loop as long as the time3 is negative
: "))
#Part of the code for the Gold winner
if timel < time2 and timel < time3 :
print ("Gold winner : ", namel)
elif time2 < timel and time2 < time3:
print ("Gold winner : ", name2)
else:
#Finding the smallest time, which represents the winner of the Gold medal.
print ("Gold winner : ", name3)
#For the Silver winner
if timel> time2 and timel < time3 or timel > time2 and timel < time3:
Finding the second smallest time, which represents the winner of the Silver medal
print ("Silver winner : ", namel)
elif time2 > timel and time2 < time3 or time2 < timel and time2 > time3:
print ("Silver winner: ",
else:
print ("Silver winner : ", name 3)
#For the bronze winner
if timel > time2 and timel > time3:
print ("Bronze winner : ",
elif time2 > timel and time2 > time3:
print ("BEonze winner : ", name2)
#Finding the greatest time, which represents the winner of the Bronze medal
else:
print ("Bronze winner : ", name 3)
Ln: 19 C
12:04 AM
( A di
O Type here to search
2/26/2021
Transcribed Image Text:group project5.py- C:/Users/user/AppData/Local/Programs/Python/Python39/group project5.py (3.9.1) File Edit Format Run Options Window Help #python program about the racewinner namel - input ("Please, enter the name of the first runner : ") #display a message for the user and put it into namel " + namel +" 's time (in minutes) :")) #display message for user and keep it into timel, time spent by the first runner during while (timel <= 0): #while loop as long as the timel is negative print ("Invalid time entry. Try again") = int (input ("please enter " + namel +" 's time (in minutes) : "")) name2 = input ("please, enter the name of the second runner: ") #display message for the user and put it into name2 time2 = int (input ("please enter "+ name2 +" 's finish time (minutes) while time2 <- 0 : #while loop as long as the time2 is negative : ")) #display message for user and keep it into time2 (time2 time spent by the second ru print ("invalid time entry. Try again") time2 = int (input ("please enter "+ name2 +" 's finish time (minutes): ")) name3 = input ("please, enter the name of the third runner : ") #display a message for the user and put it into name3 time3 = int (input ("please enter "+ name3 +" 's finish time (in minutes) : ")) while time 3 <= 0: print ("invalid time entry. Try again") time3 - int (input ("Please enter "+ name 3 +" 's finish time (in minutes) #display message for user and keep it into time2 (time 3 time spent by the third #while loop as long as the time3 is negative : ")) #Part of the code for the Gold winner if timel < time2 and timel < time3 : print ("Gold winner : ", namel) elif time2 < timel and time2 < time3: print ("Gold winner : ", name2) else: #Finding the smallest time, which represents the winner of the Gold medal. print ("Gold winner : ", name3) #For the Silver winner if timel> time2 and timel < time3 or timel > time2 and timel < time3: Finding the second smallest time, which represents the winner of the Silver medal print ("Silver winner : ", namel) elif time2 > timel and time2 < time3 or time2 < timel and time2 > time3: print ("Silver winner: ", else: print ("Silver winner : ", name 3) #For the bronze winner if timel > time2 and timel > time3: print ("Bronze winner : ", elif time2 > timel and time2 > time3: print ("BEonze winner : ", name2) #Finding the greatest time, which represents the winner of the Bronze medal else: print ("Bronze winner : ", name 3) Ln: 19 C 12:04 AM ( A di O Type here to search 2/26/2021
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Operators
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education