I am not getting quotient and remainder operation. I need ur help .two front // and % how is it used. Plz explain me | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

I am not getting quotient and remainder operation. I need ur help .two front // and % how is it used. Plz explain me

22nd Nov 2018, 2:40 AM
Umar Shabeer
Umar Shabeer - avatar
2 Answers
+ 4
print(7//2) # 3, the quotient print(7%2) # 1, the remainder
22nd Nov 2018, 2:49 AM
Kishalaya Saha
Kishalaya Saha - avatar
+ 5
the // operator, does floor division, i.e. gives the answer rounded to the nearest ones digit. the % or modulus operator, gives the remainder of a division problem.
22nd Nov 2018, 2:49 AM
LONGTIE👔
LONGTIE👔 - avatar