How to solve syntax error


#1

i cant type like this to have an answer

5mod7

in this the error is displayed as syntax error


#2

please help me with this


#3

What actually is your question?


#4

Post a reply with detailed information about your problem and possibly screen grabs of your code please and thank you.


#5

If you're trying to use a modulo, you need the % character, such as 5 % 3 == 2.


#6

@lukmaanrfd,

the so-called modulo / remainder-operator if used it will return the rest-value.

9%3 You read it as nine modulo three is zero, as 9 divided by 3 has NO rest-value.
22%6 You read 22 modulo six is 4, as 22 divided by 6 will leave you with rest-value 4
16%8 You read it as sixteen modulo eight is zero, as sixteen divided by 8 has NO rest-value.