+ 1

Why we use '/' and the '//' in python code and what does it mean( 88//2).

Please explain in easy language ..

3rd Apr 2019, 11:38 AM
Manoj Kumar
2 Answers
+ 3
/ is normal division that will result in a float value print(4/2) # result is 2.0 print(5/2) # result is 2.5 // is called floor division and it results in an integer number (quotient) print(4//2) # result is 2 print(5//2) # result is 2
3rd Apr 2019, 11:51 AM
Tibor Santa
Tibor Santa - avatar
+ 2
Thanks
3rd Apr 2019, 3:41 PM
Manoj Kumar