Computer Science, asked by yashsehgal65, 10 months ago

write a program to enter a number from the user and check whether it is even or odd number.​

Answers

Answered by Anonymous
23

hey...your answer:-

num=int(input("enter a number:"))

if num > 1:

for i in range(2,num):

if (num % i) == 0:

print(num,"is not a prime number")

print(i,"times",num//i,"is",num)

break

else:

print(num,"is a prime number")

# if input number is less than

# or equal to 1, it is not prime

else:

print(num,"is not a prime number")

Similar questions