+ 1
For what value of n would g(375,n) return 4?
def g(m,n): res = 0 while m >= n: (res,m) = (res+1,m/n) return(res)
7 Réponses
0
def g(m,n):
res = 0
while m >= n:
(res,m) = (res+1,m/n)
return (res)
for n in range(2,375):
if g(375,n) == 4 :
print(f'g(375,{n}) returns 4,n={n}')
break
0
Thank you again jayakrishna 👏
0
Gvb
0
Answer
0
For what value of n would g(375,n) return 4?
def g(m,n):
res = 0
while m >= n:
(res,m) = (res+1,m/n)
return(res)
0
For what value of n would g(375,n) return 4?
def g(m,n):
res = 0
while m >= n:
(res,m) = (res+1,m/n)
return(res)
- 2
Could anyone explain this please?