x=5.5
y=2
print(x%y)
x=5
y=2.2
print(x%y)
x=5.5
y=2.2
print(x%y)
Output:
1.5
0.5999999999999996
1.0999999999999996
Instructor
Yogesh Chawla Replied on 24/07/2023
x=5.5
y=2
print("Remainder is {}".format(x%y))
x=5
y=2.2
print("Remainder is {}".format(x%y))
x=5.5
y=2.2
print("Remainder is {}".format(x%y))
# Remainder is when you divide two numbers
# if you divide these numbers using calculator, you will get these remainder only
# modulo is nothing but what give you the remainder
# Output
# Remainder is 1.5
# Remainder is 0.5999999999999996
# Remainder is 1.0999999999999996