0
How can I solve 6.2 practice
#6.2
3 Antworten
+ 2
You can shorten it by using the divmod() function. Look it up 😊
+ 1
Thanks sir
0
Solution:
print(f"{888//60}\n{888%60}")
888//60 - Will get the hours.
888%60 - Will get the remaining minutes.
I will advise you to check these:
- What is modulo - https://www.geeksforgeeks.org/what-is-a-modulo-operator-in-JUMP_LINK__&&__python__&&__JUMP_LINK/
- What is double division -https://www.geeksforgeeks.org/benefits-of-double-division-operator-over-single-division-operator-in-python/