-5

I am new to python and this is just for personal knowledge.

So how would I design a program to take a number input N from the user and print out all the numbers from 0 to N ..

sal
  • 3
  • 1
  • 4

1 Answers1

0

This one works

n = int(input("enter a number"))
counts = 0
print (0)
while counts != n:
    counts += 1
    print(counts)
    if counts == n:
        break
sal
  • 3
  • 1
  • 4