Answers for "print 1 to 10 python"

1

how to print numbers from 1 to 20 in python

for i in range(1, 21):
    print(i)
Posted by: Guest on November-25-2020
1

print numbers from 1 to 100 in python

# range(a,b,s) allows you to iterate from a to the closest number 
# before b (excluded) with step s (default s=1)
# a,b,s are integers

for i in range(1, 101):
  print(1, end = ' ') # prints 1 2 3 ... 99 100
Posted by: Guest on June-04-2021

Code answers related to "print 1 to 10 python"

Python Answers by Framework

Browse Popular Code Answers by Language