Physics, asked by sahil9191, 11 months ago

Write a Python function that takes a number as a parameter and check the number is prime or not. 

Answers

Answered by amanpathak8833
5

hey friend mate

it will help you

Attachments:

sahil9191: thnx
amanpathak8833: wlcm mate if u like it don't forgt 2 follow me
sahil9191: hahha I don't follow every one dude
Answered by Anonymous
6

Answer:

def test_prime(n):

if (n==1):

return False

elif (n==2):

return True;

else:

for x in range(2,n):

if(n % x==0):

return False

return True

print(test_prime(9))

Similar questions