+ 1
Hello guys , I am a python student and i dont get something really good and it is modulo and floor division ...the signs👉%,//
Modulo and floor division
1 Réponse
+ 4
Floor division returns the result of a division with no remainder (an integer)
5 // 2 = 2
2 goes into 5 twice, with a remainder of 1
More on //:
// is known as floor division. It rounds off the result of a normal division to its lower limit. E.g.
10/3 = 3.3333...
10//3 = 3
________________________________________
The modulo operator (%) returns the remainder of a division
5 % 2 = 1 because the remainder is 1
(author: Trigger)
helpful links...
https://www.sololearn.com/discuss/1812061/?ref=app
https://www.sololearn.com/discuss/1505951/?ref=app
https://www.sololearn.com/discuss/459718/?ref=app
https://www.sololearn.com/discuss/1818312/?ref=app
https://www.sololearn.com/discuss/572849/?ref=app