0
what is the difference between / and // ?
3 Answers
+ 12
/ is for floating point division in Python 3. It returns a floating point number.
print(4/2) => 2.0
// is for floor division. It returns an integer.
print(4//2) => 2
0
/ division 5/2=4
// single line comment
0
/ is used to perform division between two numbers
Eg: 4/2 = 2
// is used to display the quotient of a division
Eg: 7//2 = 3