+ 1
how to make a loop displaying even numbers up to 20? on python
i tried using something like: x=0 while x<=20: print(x) x=x+2: but it keeps giving me error
6 odpowiedzi
+ 5
I wrote this for odd numbers but you will get the idea
https://code.sololearn.com/cqJUKgH6zn1D/?ref=app
+ 2
for i in range(0, 21):
if i % 2 == 0:
print(i)
0
ok thanks ill try
0
it works as i intended, thanks!
- 1
post the code here so we can see the problem.