Logic Building
# Print numbers 1 to 10
for i in range(1, 11):
print(i)Output
1 2 3 4 5 6 7 8 9 10
Use for loop with range function.
Key Concepts:
range(1, 11)generates numbers from 1 to 10- Loop variable
itakes each value - Print each value in the loop