Typo on Practice Mode in Variables and Data Types Practice Problems, 4.What Time Is It?

In the code below why does line 8 and 9 for “See the answer” show double “//” for division? It still works but is there a reason?

seconds = 48600

Write your answer below

hour = int(seconds / 3600)
minute = int((seconds - 3600 * hour) / 60)

Alternative solution

hour = seconds // 3600
minute = (seconds - 3600 * hour) // 60

*for some reason I can’t get the “#” to show up for line 3 and 7.

hey @donniegoode

Thanks for asking this question. Made me look it up formally, although I used it in some other tasks.

You can see this thread on quora

in simple terms: if the division gives float value as an answer, only return the integer or before the decimal part of it.


1 Like