What is % mean | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is % mean

If len(list)%2==0

11th Jun 2019, 10:11 PM
Mike Harris
Mike Harris - avatar
5 Answers
+ 10
That's a modules operator. It returns the remainder of 2 values. E.g. 56%3 = 2
11th Jun 2019, 10:31 PM
Jella
Jella - avatar
+ 3
% is a modulus operator ,it gives the remainder . e.g 3%2=1 5%3=2...
29th Jun 2019, 11:06 PM
Shristi Singh
Shristi Singh - avatar
+ 2
% means modulus operator It gives the value of remainder when two values are divided For example: 14%3=2 3%2=1 2%2=0
14th Jun 2019, 3:28 AM
Arun
Arun - avatar
+ 1
2 % 2 = 0 3 % 2 = 1 4 % 2 = 0 5 % 2 = 1 6 % 2 = 0 7 % 2 = 1 x%2 ==0 will tell you if a number is odd
12th Jun 2019, 1:05 AM
HNNX 🐿
HNNX 🐿 - avatar
0
if len(list)%2 == 0: if the length of the list is even.
12th Jun 2019, 2:41 AM
Choe
Choe - avatar