Computer Science, asked by nitinmallikarjun, 1 year ago

What is the value of h(231,8) for the function below?
def h(m,n):
ans = 0
while (m >= n):
(ans,m) = (ans+1,m-n)
return(ans)

Answers

Answered by har5ha
0
keep subtracting 8 from 231 until it becomes less than 8. ans is incremented by 1 every time. so it is 28 times.
Similar questions