Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR 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 = '  ')
Source by www.tutorialgateway.org #
 
PREVIOUS NEXT
Tagged: #prime #number #program #python #print
ADD COMMENT
Topic
Name
3+5 =