Write halvings(n) that counts how many times you must halve n (whole-number division by 2) to reach 1. n is at least 1.
halvings(8) → 3
halvings(1) → 0
Submit runs 4 tests, including hidden edge cases.
Each hint gives a little more help. Try on your own first.
Run your code to see the output here.