Question 10
What is the output of the following snippet of code? def g(x, y): if x == 1: return 0 return 1 + g(x // y, y) print(g(1024, 2))
What is the output of the following snippet of code? def g(x, y): if x == 1: return 0 return 1 + g(x // y, y) print(g(1024, 2))
A written answer, not marked automatically.
Question 10 of 20 in the IIT Madras BS Programming in Python (Python) End Term paper sat on 21 Dec 2025, in the September 2025 term (Intro to Python 18 Dec 25). It carries 3 marks.