Quotient & Remainder(Intro) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson

Quotient & Remainder(Intro)

When I put 1.25 % 0.5 I get a syntax error. I'm trying to get a better understanding of the modulo but when I put it to use I keep getting errors. Can someone explain what a Modulo is and how it should be used when writing the code please use a simple example(like the one above) so I can test it in code playground. Thank you very much for your help :)

6th Aug 2018, 8:07 PM
Christian - avatar
1 Answer
+ 1
You can try "print(1.25%0.5)" without the quotes and it will not make any error
7th Aug 2018, 2:02 AM
Mohammed Hany
Mohammed Hany - avatar