+ 2

what does the percentage mean? (%)

26th Jul 2017, 3:44 PM
Gareth Hayers
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.
26th Jul 2017, 3:48 PM
Dev
Dev - avatar
+ 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
26th Jul 2017, 3:48 PM
Yasiru Nayanajith
Yasiru Nayanajith - avatar
+ 1
modulo.. core-maths.. akiola
26th Jul 2017, 5:18 PM
Otumian Empire
Otumian Empire - avatar
0
it something belongs to maths make confuse
5th Aug 2017, 4:24 PM
j lakshan
j lakshan - avatar
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)
5th Aug 2017, 9:57 PM
Otumian Empire
Otumian Empire - avatar
0
Division, for ex-6%3=2
6th Aug 2017, 6:49 PM
AVINASH RAJ
AVINASH RAJ - avatar