Python Basics: How to Count from 1 to 10 Using a For Loop
# This program uses a for loop to display numbers from 1 to 10 # Loop through a range starting at 1 and ending before 11 (which means 1 to 10) for i in range(1, 11): # Print the current value of 'i' to the console print(i)
Comments
Post a Comment