主页
Python
Python math.fmod() 方法
demo_ref_math_fmod
运行 ❯
×
更改方向
保存代码
更改主题
# 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))
0.0
2.0
3.0
-1.0