For what value of n would g(637,n) return 4? If there are multiple possibilities, write any one.
def g(m,n):
res = 0
while m >= n:
(res,m) = (res+1,m/n)
return(res)
Answers
Answered by
3
5 will be the value of n, then it will return 4 for the 637 value of m.
Explanation:
- The above-defined function is a "python" function which counts the division which is done in between the value of m and n.
- So when the user passes the 637 for 'm' and 5 for n, then the division value "127.4 25.48 5.096 1.0192".
- which will be 4 times, and every time there is an increment of 1, Hence the returned value will be 4.
Learn More:
- Python : https://brainly.in/question/14689905
Similar questions
Physics,
5 months ago
Music,
5 months ago
Science,
10 months ago
Math,
10 months ago
Political Science,
1 year ago