example:

input = 5

output = prime

1 Like

the no. 5 is a prime no. , a prime no. is a positive integer greater than 1 that has no positive integer divisors other than 1 and itselfâ€¦the no. 5 is only divisible by 1 and 5 itself

2 Likes

if num > 1:

for i in range(2, int(num/2)+1):

if (num % i) == 0:

print(num, â€śis not a prime numberâ€ť)

break

else:

print(num, â€śis a prime numberâ€ť)

else:

print(num, â€śis not a prime numberâ€ť)