Commit 8850700f authored by Akhil's avatar Akhil

Add new file

parent 5a44b17c
#Print a mersenne prime from user input
n = int(input("enter a number"))
a = (2**n)-1
if n>1:
for i in range(2,n):
if n%i == 0:
print("not prime")
elif a%i == 0:
print(" not mersenne prime")
print("mersenne prime")
print("not valid")
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment