i need to implement a class called athlete which takes an __init__(self,names,fastest_time)
and another method called fastest_time which will display the name and time of the fastest athlete:
So far I have this:
class Athlete:
def __init__(self,names,ftime):
self.name=names
self.fastest=ftime
def fastest_athlete(self):
names=(['sara','jam','mary'])
times=([90,50,75])
a=Athlete(name,ftime)
a.fastest_athlete()
PROBLEM: dont know if there is need to loop through the array name 'times'? dont know how to implement the method fastest_time..HELP PLEASE
namesandtimescreating an object for each athlete. Hint:zip()will help you loop over both at the same time.