Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

prime number program in python print 1 to 100

for Number in range (1, 101):
    count = 0
    for i in range(2, (Number//2 + 1)):
        if(Number % i == 0):
            count = count + 1
            break

    if (count == 0 and Number != 1):
        print(" %d" %Number, end = '  ')
Comment

PREVIOUS NEXT
Code Example
Python :: tensorboard dev upload in background colab 
Python :: max path limit python 
Python :: Parallel run of a function with multiple arguments partial 
Python :: convert json file to dict - if comming as list 
Python :: how to add trailing zeros in the number 
Python :: python set prcess name 
Python :: nptel swayam 
Python :: what does alpha in plt.txt do 
Python :: displays unique data including null data 
Python :: python copy virtual env modules 
Python :: any(iterable) 
Python :: insert string into middle of list python 
Python :: how to read comment before the root element of xml python 
Python :: tkinter auto refresh content periodically 
Python :: Remove outliers with median value and Capping 
Python :: django url with special characters in template 
Python :: Incrémenter/décrémenter variable python 
Python :: negative index python 
Python :: handling image files django aws 
Python :: select data frame with categorical datatype in pandas 
Python :: check if varible is emyt pyton 
Python :: how to track exact location of a phone number in python 
Python :: how to get the string between brackets in a string in python 
Python :: flask-sqlalchemy inheritance 
Python :: pandas assign multiple columns 
Python :: Python script to do something at the same time every day 
Python :: django muti user for 3 users 
Python :: how to reassign a key py 
Python :: jupyter notebook print formatted text 
Python :: spark sparsevector to list 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =