promptdojo_

while, break, and the infinite loop AI ships — step 8 of 9

Write a while loop that starts with the number 10 and counts down by 2, printing each value on its own line, until the value is no longer positive.

Expected output:

10
8
6
4
2

full-screen editor opens — close anytime to keep reading.