# 39. How do you check if the given number is prime?
import math
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
print("~~~~~~~~~~~~~~~~Hello!~~~~~~~~~~~~~~~~")
print("~Let's check if your number is prime.~")
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n")
userNum = input("Please enter a number:")
userNum = int(userNum)
check = True
if(userNum == 0 or userNum == 1):
check = False
elif(userNum == 2):
check = True
else:
for i in range(2, round(math.sqrt(userNum)+1)):
if(userNum % i == 0):
check = False
break
if(check):
print("\n\nYour number is prime!\n")
else:
print("\n\nYou number is NOT prime!\n")