0

What is Modulo?

You can use floor division to find the number of hours, and the modulo operator to find the remaining minutes.

8th Nov 2021, 9:18 AM
Jeffrey Lee
4 Answers
+ 1
Modulo is remainder. You straight up said it in the description. 3 % 2 == 1
8th Nov 2021, 9:29 AM
Slick
Slick - avatar
+ 1
Okay, thanks for explaining the problem. The math isn't that bad. - You start with a number of minutes. - We know there are 60 minutes in an hour. - To get a whole number of hours (no remainder) we use // - To get the remainer, we use the same numbers but with the % (<-- modulo)
8th Nov 2021, 2:23 PM
Slick
Slick - avatar
0
Hi, seems like I don't understand the question. Sorry I'm noob. Random task! You need to calculate the number of hours in 888 minutes. Your program needs to output the number of hours and then the number of remaining minutes, on separate lines. For example, 72 minutes are equal to 1 hour and 12 minutes, so your program would output: 1 12
8th Nov 2021, 1:45 PM
Jeffrey Lee
0
Okay, it worked. Thanks
9th Nov 2021, 2:01 AM
Jeffrey Lee