+ 4
Variable problem
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. I answered print(7245/550) But the answer somehow is incorrect
33 ответов
+ 3
Maybe try print(float(7425/550))
Maybe it wants the answer as a float?
+ 6
Hassanah is correct, it should be a float. Python automatically converts division into a float.
Prem Suthar look closely at your numbers and look at what Hassanah wrote.
They are different.
+ 3
Auricelio
I too guess that's the answer but its showing that it isn't
+ 3
Thanks to all of you for showing your effort ! 💞
+ 3
Djzani Qwhuame & Jay please start your own thread and don't try to take over someone else's.
+ 2
Hello,
Is it ok if you could put a link to your code? Also do you know what the output should be?
+ 2
I cannot link as it is an part of lesson
And i searched about the code answers and i get the same code which i wrote , but its wrong Hassanah
+ 2
Wouldn't the answer be
print(7245 // 550)?
This way, time would be 13 hours.
+ 2
Per Bratthammar
The answer should be in float.
+ 2
Ausgrindtube
I understood what Hassanah said , i have checked the numbers multiple times.
+ 2
Hassanah
Yes !
That's the correct answer
Thank you so much buddy
+ 2
You're welcome Prem Suthar!
+ 2
Jay Take the course buddy
+ 2
Jay, as u were asking so politely:
Theres multiple courses:
- Python for beginners
- Core python
Teaching you coding in chat wont work, at least not for me.
+ 1
Ausgrindtube
Yeah , he is correct thanks for the effort
+ 1
BALAJI A
Uhh , yeah it's correct , but it could be simply done in one line.
+ 1
7245 is in your answer, but 7425 is in the task
+ 1
You mixed up the numbers and changed the value, it's 7425 but in the code you used 7245.
Hope you see it
+ 1
Hi
Im new
Can someone teach me python
on this chat