如何在python中找到除法的余数?

问题描述

在python中,我将变量除以k和h之后,如何找到方程的余数?这是我的代码

h = int(input())
print(k / h)

解决方法

简单的数学就能解决问题:

h = int(input())
print(k % h)