Page 1 of 1

Python: While Loops

Posted: Wed Jul 23, 2025 1:02 am
by Jason

Code: Select all

i = 1

while i <= 10

	print(i)
	
	i += 1
	
# Loop i is declared starting at 1.

# It goes up to the point where i is less than or equal to 10.  

# Loop is to be printed.  

# Loop goes thru and increments by 1 and is printed out.