0

In python, after I have divided to variables (k and h) How do I then find the remainder of the equation? This is the code I have:

h = int(input())
print(k / h)
  • With the modulus operator: `k%h`. If you want both the result and the remainder `divmod(k,h)` – yatu Aug 28 '20 at 09:16

1 Answers1

0

Simple math does the trick:

h = int(input())
print(k % h)
andy meissner
  • 1,202
  • 5
  • 15