+ 1
Stuck in lesson {solved}
Stuck in lesson 6.2by python for beginners have to make a code to see how many hours there are in 888 min and it should say remainder min if anyone can help with explaining Thanks
7 Antworten
+ 1
it looks like a string input, not an int(input()
You need to operate on numbers, not text
+ 3
I don't know exactly what you are trying to do, but this might help
mins = 888
hrs = mins // 60
remainder = mins % 60
print(hrs)
print(remainder)
Take note of the floor division //
and the modulo operator %
+ 2
Hint:
Divide 888 by 60, you get hours. Use floor division operator to get a whole number.
Modulo 888 by 60 you get remainder minutes.
Good luck! 👍
+ 2
Thanks
+ 2
Rik thanks you got the prob took out the ‘ and it worked
+ 1
Put in. Print (‘888//60’)
Print (‘888%60’)
And it still does not work any ideas
+ 1
Please like