what does h(3231) return for the following function definition? def h(x): (m,a) = (1,0) while m <= x: (m,a) = (m*2,a+1) return(a | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

what does h(3231) return for the following function definition? def h(x): (m,a) = (1,0) while m <= x: (m,a) = (m*2,a+1) return(a

Help me out

13th Aug 2019, 6:06 PM
Su bagar Miwn
Su bagar Miwn - avatar
2 Answers
0
12
13th Aug 2019, 6:08 PM
Ilya Vouk
Ilya Vouk - avatar
0
12 or 1 depending on your indentation. I just answered this quesion a couple of minutes ago in https://www.sololearn.com/discuss/1929430/?ref=app
13th Aug 2019, 6:18 PM
Brave Tea
Brave Tea - avatar