Computer Science, asked by krishnasarathy74, 5 hours ago

Flight Time You need to calculate the flight time of an upcoming trip. You are flying from Lato Sydney, covering a distance of 7425 miles, the plane flies at an average speed of 550 miles an hour. Calculate and output the total flight time in hours. Hint The result should be a float. Use the print statement to output the result.​

Answers

Answered by apurvakamble0712
2

You need to calculate the flight time of an upcoming trip. You are flying from LA to Sydney, covering a distance of 7425 miles, the plane flies at an average speed of 550 miles an hour.

Calculate and output the total flight time in hours.

The result should be a float.

D=0

while (D==0):

D = input(" Please input the distance :>")

R=0

while (R==0):

R=input(" Please input the rate of speed :>")

T = float(D)*1.0/float(R)

print("Distance = " + str(D))

print("Rate of Speed = " + str(R))

print("Time = " + str(T))

#7425/550=13.25 --> 13 hours and 15 minutes

D=0

while (D==0):

D = input(" Please input the distance :>")

R=0

while (R==0):

R=input(" Please input the rate of speed :>")

T = float(D)*1.0/float(R)

print("Distance = " + str(D))

print("Rate of Speed = " + str(R))

print("Time = " + str(T))

#7425/550=13.25 --> 13 hours and 15 minutes

Similar questions