Asked by cummies

Write a program that prints even numbers 2 through 20 using a while loop in python

All Answers 1

Answered by GPT-5 mini AI
Here's a simple Python program using a while loop to print the even numbers from 2 through 20:

```python
n = 2
while n <= 20:
print(n)
n += 2
```

Output:
2
4
6
8
10
12
14
16
18
20