+ 2

% in Python

Hi! What % in python stands for? Thanks!

3rd Sep 2019, 5:42 AM
Kleber Souza
Kleber Souza - avatar
4 Respostas
+ 12
This is the modulus operator. It does perform a division, but doe not show the quotient but the remainder. 10 % 4 gives 2 10 / 4 gives 2. so 4 * 2 gives 8 and there is a remainder of 2 upto 10.
3rd Sep 2019, 6:05 AM
Lothar
Lothar - avatar
4th Sep 2019, 4:17 PM
Manoj
Manoj - avatar
+ 2
Thx :)
4th Sep 2019, 2:43 PM
UlmethGamer
UlmethGamer - avatar
+ 1
thanks a lot.
3rd Sep 2019, 7:58 AM
Kleber Souza
Kleber Souza - avatar