- Modulo operator: The modulo is defined as "the remainder of the two arguments ".
- It is denoted by the symbol "%".
- When we divide any number with 0 i.e; x%0 the result is zero division error.
- We can use int, float, and double values also.
- Those int, float, double may be either positive or negative.
x is the first argument and y is the second argument.
#1.write a python program using the modulo operator.
- x=10.0
- y=2.0
- print(x%y)
output: 0.0
#2.write a Python Program for a value divides with 0 using the modulo operator.- x=10.0
- y=0
- print(x%y)
output: zero division error
- x=10.0
- y=0
- print(x%y)
output: zero division error