-
Notifications
You must be signed in to change notification settings - Fork 324
/
Copy patholympicRecords.py
39 lines (32 loc) · 1.42 KB
/
olympicRecords.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#CSci 127 Teaching Staff
#FALL 2021
#A template for a program that returns olympic world records
#Modified by: ADD YOUR NAME HERE
def worldRecord(gender, event):
"""
Write a function worldRecord(), that takes two parameters: gender (string) and the event type (int).
The function should return a float for the Olympic world record for the event.
Men's Standard, event type 100 meters: record is 9.63 seconds.
Men's Standard, event type 200 meters: record is 19.30 seconds.
Men's Standard, event type 400 meters: record is 43.03 seconds.
Women's Standard, event type 100 meters: record is 10.62 seconds.
Women's Standard, event type 200 meters: record is 21.34 seconds.
Women's Standard, event type 400 meters: record is 48.25 seconds.
Return -1 for any other value
"""
time = 0.0
###################################
### FILL IN YOUR CODE HERE ###
### Other than your name above, ###
### this is the only section ###
### you change in this program. ###
###################################
return(time)
def main():
z = input('Enter the gender: ').lower()
t = int(input('Enter the event distance: '))
record = worldRecord(z,t)
print("The record for "+z+" 's "+ str(t) + " meters is", record)
#Allow script to be run directly:
if __name__ == "__main__":
main()