print("Enter 'e' for exit.")
num = input("Enter any number: ")
if num == 'e':
exit();
try:
number = int(num)
except ValueError:
print("Please, enter a number")
else:
for i in range(2, number):
if number%i == 0:
print(number, "not prime number.")
break;
else:
print(number, "prime number.")
break;
No comments: