Computer Science, asked by avinash9912, 5 months ago

5 m
Question 4.
Write a program to accept a number and check whether it is a prime number.
Ounction

Answers

Answered by Anonymous
1

Answer:

hi...

Explanation:

n=int(input ("enter the number"))

if n==2:

print("prime")

else:

for i in range(2,n):

if n%i==0:

print("not a prime")

else:

print ("prime")

hope it helps you ☺️

Similar questions