Prime number
A prime number is a number greater than 1 with only two factors – themselves and 1. A prime number cannot be divided by any other numbers without leaving a remainder.
Input
11
Output
prime
Program to print prime or not
#program to print even or odd.
num = int(input("enter an integer "))
if num==1:
print("neither prime nor composite")
for i in range(2,num):
if num%2==0:
print("composite")
break
else:
print("prime")
break
Comments
Post a Comment
Type Your Comments !
Please do not enter any spam link in the comment box.