Python Tutorial

Python While Loops

While Loops

n = 3
while n > 0:
    print(n)
    n -= 1
Try it Yourself
Run this PYTHON example in your local environment or course sandbox.