0

What exactly is the purpose of floor division and modulu?

It's to find the number of times a number can go in another number providing a whole number and ignoring the remainder rather than a decimal, right? and the modulu is the remainder of what you've divided, as a whole number or the significant figure rather than a decimal, right?

17th Jan 2019, 6:07 AM
Nicholas Do
3 ответов
+ 4
There are several purposes. If you want to convert seconds to minutes and seconds, you can use floor and modulo division: 100 seconds = 100//60 = 1 minute and 100%60 = 40 seconds
17th Jan 2019, 7:03 AM
Anna
Anna - avatar
+ 1
% ==0 is used to test Divisible or not, in other words is prime number or not.
17th Jan 2019, 6:11 AM
Gordon
Gordon - avatar
0
oh, okay thks
17th Jan 2019, 6:12 AM
Nicholas Do