def is_prime(n):
# Write your function code here…
if 2 <= n and n < 1000 :
for i in range(2, n):
if n % i == 0:
return False
else:
return True
print(is_prime(975))
why print(is_prime(975)) is true prima and n = 2 is none.I need answer 975 is false and n = 2 is true
New contributor
Foxee Saga is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.