Calculate and output the total flight time in hours. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Calculate and output the total flight time in hours.

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. Hint The result should be a float.

6th Jul 2021, 10:17 AM
Namutebipasha
Namutebipasha - avatar
8 Answers
0
distance = 7425 speed = 550 time = distance / speed print("Total flight time is", time, "hours")
7th Jul 2021, 1:26 AM
Ali Shah Jindani
Ali Shah Jindani - avatar
+ 4
Hi! Please, show us your code attempt! Thx!
6th Jul 2021, 10:18 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 2
Use print command and / operator
6th Jul 2021, 10:21 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 1
Thank you
6th Jul 2021, 10:25 AM
Namutebipasha
Namutebipasha - avatar
0
Print(7425//550)
6th Jul 2021, 10:19 AM
Namutebipasha
Namutebipasha - avatar
0
Am new here, I have little knowledge about programming, need help
6th Jul 2021, 10:19 AM
Namutebipasha
Namutebipasha - avatar
0
Here is the code:- x=7425 print (x/550)
7th Jul 2021, 6:17 AM
Naveen Das
Naveen Das - avatar
0
# Flying time from LA to Sydney distance=7425 speed=550 print(distance/speed)
3rd Dec 2022, 3:55 AM
Jas