+ 3

Python floats

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.

3rd Feb 2021, 12:27 PM
Aditya
Aditya - avatar
7 Respostas
- 1
// is floor division, use / to get the decimal.
3rd Feb 2021, 12:30 PM
你知道規則,我也是
你知道規則,我也是 - avatar
+ 1
Print((7425.0/550.0))
5th Apr 2022, 4:15 AM
Prakhar Dwivedi
Prakhar Dwivedi - avatar
0
6th May 2021, 7:40 AM
Dhanwate Vaishali Bapusaheb
- 1
Okay
3rd Feb 2021, 12:30 PM
Aditya
Aditya - avatar
- 2
Show the code then only we can correct you properly
3rd Feb 2021, 12:29 PM
Atul [Inactive]
- 3
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.
3rd Feb 2021, 12:30 PM
Aditya
Aditya - avatar
- 7
print(7425/550)
7th Apr 2021, 9:47 AM
Rogelio B. Catubig Jr.
Rogelio B. Catubig Jr. - avatar