Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to print 100 to 1 in python

n = 100
for i in range(n, 0, -1):
    print(i)
Comment

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
Comment

PREVIOUS NEXT
Code Example
Python :: javascript or python 
Python :: how to check if a string value is nan in python 
Python :: how to append data in excel using python pandas 
Python :: how split text in python by space or newline with regex 
Python :: csv to txt code pandas 
Python :: gui with pygame 
Python :: python3 password generator script 
Python :: how to check if a list is empty in python 
Python :: python os check if file with extension exists 
Python :: print statements 
Python :: identify if a number is prime 
Python :: comment multiple lines python 
Python :: timeit command line 
Python :: 1024x768 
Python :: call methods from within a class 
Python :: get status code python 
Python :: pandas dataframe total column 
Python :: how to print multiple integers in python in different line 
Python :: Mixed Fractions in python 
Python :: customize path in url 
Python :: code error correction 
Python :: santhal paragana 
Python :: create bbox R sp 
Python :: gnome-terminal stopped executing after python 3.6 is installed 
Shell :: run lumen project 
Shell :: what is --use-feature=2020-resolver 
Shell :: ubuntu extract rar 
Shell :: conda install keras 
Shell :: restart redis ubuntu 
Shell :: restart rabbitmq service linux 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =