HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Math Methods : Return the remainder of x with respect to y
The math.remainder()
method returns the
remainder of x with respect to y.
Parameter | Description |
---|---|
x | Required. The number you want to divide. |
y | Required. The number you want to divide with. It must be a non-zero number, or a ValueError occurs. |
Return Value: | A float value, representing the remainder |
---|---|
Python Version: | 3.7 |
Return the remainder of x/y:
print (math.remainder(23.5, 5))
print
(math.remainder(23, 5.5))
print (math.remainder(12.5, 2.5))
print
(math.remainder(12, 2))