I’m new to Python and having trouble just understanding what exactly this question is asking me to do:
"A grasshopper is trying to reach a flower that’s N feet away by hopping to it. However, there are some restrictions on how it can hop.
It can only hop forward, not backward. If it passes the flower, it can’t come back.
At any given point, it can hop either M feet, or just 1 foot.
On a single line of input, you’re given 2 integer values: N and M.
Determine the minimum number of hops it will take the grasshopper to reach the flower exactly."
Please help! So far...
def num_of_hops(n, m):
while m < n / n % 1:
m += 1
if m > n:
break