+ 2
what does the percentage mean? (%)
6 Respostas
+ 15
That percent sign is called a modulo.
The % (modulo) operator yields the remainder from the division of the first argument by the second. The numeric arguments are first converted to a common type. A zero right argument raises the ZeroDivisionError exception. The arguments may be floating point numbers, e.g., 3.14%0.7 equals 0.34 (since 3.14 equals 4*0.7 + 0.34.) The modulo operator always yields a result with the same sign as its second operand (or zero); the absolute value of the result is strictly smaller than the absolute value of the second operand.
+ 5
If you mean like this.
(%=Modulus)
5%2=1
5 Divided by 2 is 4, so remaining will be 1. So % gives you the remaining after dividing
+ 1
modulo.. core-maths.. akiola
0
it something belongs to maths make confuse
0
also I learnt smth today about the % ..
var="my name is %s"
print (var %sololearn)
output
my name is sololearn..
source:: snake wrangling( python for kids)
0
Division, for ex-6%3=2