Python: While Loops

Post Reply
User avatar
Jason
Site Admin
Posts: 923
Joined: Sun Dec 21, 2025 8:56 pm

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.
 

POSTREACT(ions) SUMMARY

Post Reply