+ 1
What is mean % percent symbol?
Not able to understand
4 Answers
0
It Divides left hand operand by right hand operand and returns remainder. for example 5%4=1, 8%4=0.
+ 3
% may be the modulo operator (to find the remainder of division of 2 numbers).
>>5%2
>>1
or
% is also used as string formatting operator (often used in Python 2 but still works on Python 3)
a = 20
>>print("the given number is %d" % a)
>>the given number is 20
0
% means remainder.. Isn't
0
Thanks