python / and // difference code example
Example 1: 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
Example 2: 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