Doing math operators | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Doing math operators

Stuck on this portion of the course a=8 A/=3 Puts 4%a What’s the output is the question Outside of the answer what’s the longform doing the math?? Thanks for your help

5th Jan 2018, 11:35 PM
Thomas Zurch
Thomas Zurch - avatar
4 Answers
+ 4
because / divide numbers like integers(whole numbers) and then 8/3 = 2 and then % gives remainder after divison like this before so 4 / 2 = 2 and remainder is 0
6th Jan 2018, 12:14 AM
Vukan
Vukan - avatar
+ 5
8/3=2 4%2=0 output is 0
5th Jan 2018, 11:39 PM
Vukan
Vukan - avatar
+ 1
Thanks! Thats worked how is “0” though 2 is remainder how is “% “ used
6th Jan 2018, 12:12 AM
Thomas Zurch
Thomas Zurch - avatar
0
Thanks can seem complex ..help appreciated. Clears it up
6th Jan 2018, 12:17 AM
Thomas Zurch
Thomas Zurch - avatar