Speed, Time and Distance measurement
Initialize
Enter a Distance in km
Enter a Time hours
Calculate Speed
Enter a Distance in km
Enter a Speed in km/h
Calculate Time
Enter a Speed in km/h
Enter a Time in hours
Calculate Distance
Step Execution
def measurement(exe1):
if(exe1 ==1):
speedfun(distance,time)
if(exe1 ==2):
timefun(distance,speed)
if(exe1 ==3):
distancefun(speed,time)
measurement(exe1)
def speedfun(distance,time):
speedget=distance/time
return(speedget)
def timefun(distance,speed):
timeget=distance/speed
return(timeget)
def distancefun(speed,time):
distanceget=speed*time
return(distanceget)
Start
Next Line
Clear All
Code Output
Your output: