Program to check Prime Number || Conditional Statement || Python

In this we are going to see a program to check whether a Number is Prime Number in Python Programming Language.


num = int(input("Enter The Number : "))
k = 0
if num == 0 and num == 1:
    k = 1
for i in range(2,num):
    if num % i == 0:
        k = 1
if k == 1:
    print("The Number Is Not A Prime Number")
else:
    print("The Number Is A Prime Number")

# Coded By DHIRAJ SHELKE   


#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post