+ 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)

24th Jan 2022, 7:16 PM
pooja balamurugan
pooja balamurugan - avatar
7 Answers
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
24th Jan 2022, 7:40 PM
Jayakrishna 🇼🇳
0
Thank you again jayakrishna 👏
24th Jan 2022, 7:41 PM
pooja balamurugan
pooja balamurugan - avatar
0
Gvb
27th Jan 2022, 11:18 AM
Vamshi Kore
0
Answer
24th Jan 2024, 7:30 PM
shankarsrinivas Medagam
shankarsrinivas Medagam - avatar
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)
30th Jan 2024, 2:49 PM
Manikanta
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)
30th Jan 2024, 2:49 PM
Manikanta
- 2
Could anyone explain this please?
27th Jan 2022, 5:23 PM
Jeeva gopinath