PY/MATH
Home
Challenges
Concepts
Progress
Final Project
0 XP
·
L1
EN
NO
☾
⚙
← Challenges
Sequences · Medium
Collatz Steps
Write `collatz_steps(n)` returning how many steps until n becomes 1. Even ⇒ n//2; odd ⇒ 3n+1.
solution.py
○ Loading…
Reset
Loading...
Run code
Check solution
Console
Test cases
collatz_steps(1)
PENDING
collatz_steps(6)
PENDING
Hidden
PENDING
Hints
Reveal next hint
>_