Python program to Print Natural number 1 to N

num = int(input("Please Enter any Number: "))
i = 1
print("Natural Numbers from 1 to {0} are".format(num))
while (i <= num):
 print (i, end = ' ')
 i = i + 1

OUTPUT:

Please Enter any Number: 11
Natural Numbers from 1 to 11 are
 1 2 3 4 5 6 7 8 9 10 11

Leave a Comment