main.py338 chars9 lines
In this code, we use a while loop to print even numbers from 1 to 100. Inside the loop, we use a conditional statement to check if the current value of i
is an even number. If the number is even, we print it to the console. We then increment the value of the counter i
by 1 and repeat the process until we reach the number 100.
gistlibby LogSnag