prime number in python

Posted by Paidboom - 1 year ago

prime number in python : Python Program to Check Prime Number

check_no = 23
extra_var = True
if check_no > 1:
    for i in range (2, check_no):
        if(check_no % i) == 0:
            extra_var = False
            break

# here check Then Given by user Number is Prime or Not
print(extra_var)

if extra_var:
    print(check_no, "Good Luck It number is a absolute prime number")
else:
     print(check_no, "It number is not a PrimeNumber")