Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

prime number program in python

def prime_number(a):
    for i in range(2,a):
        if a%i == 0:
          return False
    return True
n = int(input("Enter a number = "))
print(prime_number(n))
 
PREVIOUS NEXT
Tagged: #prime #number #program #python
ADD COMMENT
Topic
Name
4+5 =