Using the for statement output between 1-100 all even

Using the for statement output between 1-100 all even

for i in range(1,101):
    if i%2==0:
        print(i)

1-100 using the while statement can be digitally output divisible by 3

j=1
while j<100:
    if j%3 ==0:
        print(j)
    j+1

 

Guess you like

Origin www.cnblogs.com/qsmyjz/p/11994842.html