First 20 natural numbers using a for loop

In this program, we will print the first 20 natural numbers using a for loop.

Steps to solve the program
  1. Use for loop to iterate over the first 20 natural numbers.
  2. Print the numbers.
				
					
for i in range(1,21):
    print(i,end=" ")
				
			

Output :

				
					1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 
				
			

Print the table of a number

display numbers from a list

Leave a Comment