0
Please what is the meaning of this syntax in python3 --> e.g: a = b//c ?
Thanks for help!
3 Antworten
+ 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
+ 1
It will just give the integer part when you divide like 8//3 ,so it will output 2 only
+ 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