+ 1

flight time code section

How do I go with flight aspect, calculating the time difference in hours using float

3rd Jan 2023, 4:02 PM
Prince Korankye
Prince Korankye - avatar
6 Antworten
+ 7
Prince Korankye , can you please update your post: > if your question is related to a tutorial / exercise please mention this. > to get helpful support please link your code here.
3rd Jan 2023, 4:30 PM
Lothar
Lothar - avatar
+ 8
Prince Korankye , Time=distance/speed / ----> it gives the answer in float // ----> it is floor division gives whole number as answer Try to code using this formula!!!
3rd Jan 2023, 4:28 PM
Riya
Riya - avatar
+ 5
Prince Korankye , distance =7425 time =550 speed = distance /time print(speed) It is correct I used that for highlighting purpose...
8th Jan 2023, 1:58 AM
Riya
Riya - avatar
+ 3
Prince Korankye , Yeah speed = distance /time But print statement should be like this , print(distance/time)====>speed
7th Jan 2023, 6:08 AM
Riya
Riya - avatar
+ 1
Well, distance="7250" Time="550" Umm .. asking can this be possible to get correct floating digits with Print<distance/time> can I resolve , With the above 👆 description
7th Jan 2023, 5:33 AM
Prince Korankye
Prince Korankye - avatar
+ 1
distance =7425 time =550 speed = distance /time print(distance/time) ====>speed I can observe something ^👆 check out the error from the print line
7th Jan 2023, 9:23 PM
Prince Korankye
Prince Korankye - avatar