Q:

Print First 10 natural numbers using while loop

0

Print First 10 natural numbers using while loop

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

i = 0
while i <= 10:
    print(i)
    i += 1

need an explanation for this answer? contact us directly to get an explanation for this answer
need an explanation for this answer? contact us directly to get an explanation for this answer

counter = 1
for x in range(10):
    print(counter)
    counter +=1

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (2)

Similar questions


need a help?


find thousands of online teachers now