What does h(19685)return for the following function definition? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What does h(19685)return for the following function definition?

https://code.sololearn.com/cs8DGmr6Jv9h/?ref=app

25th Sep 2020, 2:40 PM
Sindhuja Selvakumar
Sindhuja Selvakumar - avatar
4 Answers
+ 2
10
25th Sep 2020, 2:48 PM
Abhay
Abhay - avatar
+ 2
d=1 and n=0 while loop begins 1<19685 d=3,n=1 3<19685 d=9,n=2 9<19685 d=27,n=3 27<19685 d=81,n=4 81<19685 d=243,n=5 243<19685 d=729,n=6 729<19685 d=2187,n=7 2187<19685 d=6561,n=8 6561<19685 d=19683,n=9 19683<19685 d=59049,n=10 Now 59049 is not less than 19685 So the loop terminates and n=10
25th Sep 2020, 3:08 PM
Avinesh
Avinesh - avatar
+ 1
Why don't you just try to print h(19685)?
25th Sep 2020, 2:50 PM
Seb TheS
Seb TheS - avatar
0
Tqq soo much
25th Sep 2020, 3:12 PM
Sindhuja Selvakumar
Sindhuja Selvakumar - avatar