Practice ยท 2 of 3
Halving Loop
n = 40 is given. Print n after each halving (40, 20, 10, 5, 2) while it is at least 2 โ using integer division and a while loop.
Difficulty: beginner
Press Submit to check your solution.
Back to lesson: Practice: while & Game Logic