Return the remainder of x/y:
# Import math Library
import math
# Return the remainder of x/y
print(math.fmod(20, 4))
print(math.fmod(20, 3))
print(math.fmod(15, 6))
print(math.fmod(-10, 3))
print(math.fmod(0, 0))
Try it Yourself » Definition and UsageThe math.fmod()
method returns the remainder (modulo) of x/y.
Note: If both x and y = 0, it returns a ValueError.
Note: If y = 0, it returns a ValueError.
Note: If x or y is not a number, it returns a TypeError.
Technical Details Return Value: Afloat
value, representing the remainder of x/y Python Version: 1.4
Track your progress - it's free!
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4