Please what is the meaning of this syntax in python3 --> e.g: a = b//c ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Please what is the meaning of this syntax in python3 --> e.g: a = b//c ?

Thanks for help!

24th Apr 2020, 9:06 AM
YoungMind
YoungMind - avatar
3 Answers
+ 1
Integer division example :- b=8 c = 4 a = b//c output :-2 if you put single slash float division a = b/c output:- 2.0
24th Apr 2020, 9:09 AM
Rishi
Rishi - avatar
+ 1
It will just give the integer part when you divide like 8//3 ,so it will output 2 only
24th Apr 2020, 9:23 AM
Abhay
Abhay - avatar
+ 1
a = b//c // = This is symbol for floor division which shows how many times c goes in b Example 10//3 3 3 goes into 10 three times Example a = b//c b = 20 c = 6 output = 3
24th Apr 2020, 9:55 AM
Tega Somuvie
Tega Somuvie - avatar