loading...

re: Daily Challenge #36 - Let's go for a run! VIEW POST

FULL DISCUSSION
 

Python

def runningPace(distance, time):
    time= time.split(':')
    time=int(time[0])*60+int(time[1])
    pace=int(time/distance)
    m=pace//60
    s=str(pace-(m*60))
    if int(s)<10:    s='0'+str
    return '%d:%s' %(m,s)
Code of Conduct Report abuse