
The halving loop inside count_steps never reaches 0: repair it so the function returns how many halvings it takes to bring start down to 0.
count_steps(0)Expected result
0For your own tracking. Tests grade your code.
count_steps(3)Expected result
2count_steps(255)Expected result
8count_steps(4294967295)Expected result
32Expected files
loop_termination.cAllowed functions
None. Write every helper yourself.
Allowed headers

v0.40: Create exercises. Challenge the community.
Meet Studio →The halving loop inside count_steps never reaches 0: repair it so the function returns how many halvings it takes to bring start down to 0.
count_steps(0)Expected result
0For your own tracking. Tests grade your code.
count_steps(3)Expected result
2count_steps(255)Expected result
8count_steps(4294967295)Expected result
32Expected files
loop_termination.cAllowed functions
None. Write every helper yourself.
Allowed headers

Run the tests to grade your code
Build your code, then check each test here. Open a result to inspect its output.