Answers for "diff between / and // in python"

0

diff between / and // in python

#this operator(//) return the quotien of the division , specifically the int quotein
print(5//2)
# 2 
#this operator(/) return us the exact solution no matter if its float type or anything
print(5/2)
# 2.5
Posted by: Guest on April-30-2021
-1

difference between % and // in python

# The true div operator (//) return the quotien of a division
print(5 // 2)
# 2

# The modulo operator (%) returns the reminder of a division
print(5 % 1)
# 1
Posted by: Guest on March-13-2021

Code answers related to "diff between / and // in python"

Python Answers by Framework

Browse Popular Code Answers by Language