French, asked by Anonymous, 1 year ago

program to input a number and test if it is a prime number.​

Answers

Answered by gizBOT
0
Primes are : which don’t divide by any other number or have no more factors other than 1,and itself
Answered by Anonymous
23

num=int(input("Enter number:"))

lim=int(num/2)+1

for i in range(2,lim):

rem=num%i

if rem==0:

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

Break

else:

print (num,"is a prime number")

Similar questions