Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python code for checking if a number is a prime number

for i in range(2, 20):
    for x in range(2, i):
        if i % x == 0:
            break
    else:
        print(i, "is a prime number")
 
PREVIOUS NEXT
Tagged: #Python #code #checking #number #prime #number
ADD COMMENT
Topic
Name
3+2 =