0

I don't understand the flight time project in python for beginner

Calculate and output the flight time on hours of 7425 miles at 550 miles an hour

7th Mar 2021, 12:10 PM
Solo Dev Tech
15 odpowiedzi
+ 3
Clinton You have to calculate the number of hours to complete the journey. In one hour you can go upto 550 miles. So to get the number of hours you have to devide the distance by 550.Like given below answer = ( 7425 / 550 ) print(answer)
7th Mar 2021, 12:58 PM
K.S.S. Karunarathne
K.S.S. Karunarathne - avatar
+ 5
For 1hr, => 550 miles How many hrs for => 7425 miles.? Time = distance/speed May it helps there. read description again
7th Mar 2021, 12:17 PM
Jayakrishna 🇮🇳
+ 2
I'm on the same boat, figured I would just continue here. My code was: -------------------------- distance=7425 average_speed=550 print(distance//average_speed) -------------------------- I tried it with another python compiler, it worked no errors. however, sololearn still has it blocked, what am I doing wrong? Legit wanna learn Update: it was a simple math problem, I got it. I may have thought I needed to do more
18th Mar 2021, 2:01 AM
Jtsilao
Jtsilao - avatar
+ 1
You can use the following formula to calculate the time: Time = Distance / Velocity (assuming the velocity stays constant during the whole time)
7th Mar 2021, 12:16 PM
Abir Hasan
Abir Hasan - avatar
+ 1
Look, We have 7425 miles to get to arrive. our plane have a 550miles/hour speed. so the formula is miles/hours! X: Distance/Speed=hours we on flight print(X)
27th Jun 2022, 1:29 PM
AmirHesam Piri
AmirHesam Piri - avatar
0
I'm confused
7th Mar 2021, 12:12 PM
Solo Dev Tech
0
Hi, what exactly is the problem?
7th Mar 2021, 12:17 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
Thanks guys
17th Mar 2021, 6:56 PM
Solo Dev Tech
0
Hi! Why you use // operator? do you know how it works?
18th Mar 2021, 3:28 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
i think i know now, // whole number division, / float number?
18th Mar 2021, 5:34 AM
Jtsilao
Jtsilao - avatar
0
/ - normal division (the result will be converted to float) // - integer division (the fractional part will be discarded)
18th Mar 2021, 5:42 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
The answer is: answer=float(7425.0/550.0) print("answer")
11th Jun 2021, 12:50 PM
Md Akif Hossain
Md Akif Hossain - avatar
0
They were talking about floor division and remainders with %. Then threw just regular division into it. Ugh! So confusing.
17th Jun 2021, 3:46 PM
Alex Nunez
Alex Nunez - avatar
0
question says hours? so should be 13 hours 7425.0 // 550. But not the correct way????? 7436.0 / 550 to give 13.5
22nd Jul 2022, 11:09 PM
coderjoe
0
distance=7425 speed=550 print(float(distance/speed))
23rd Nov 2022, 8:24 AM
Tamilarasi
Tamilarasi - avatar