Python program to print the prime numbers or not

Python program to print the prime numbers or not. In the Python programming language, prime or not prime. To become a python programming expert, learn basic Python program. To determine whether a number is prime or not, use the for loop in Python.A ” prime number ” is a counting number that can only be divided by itself and one.

a = 17
if a > 1:
for i in range(2,a):
if (a % i) == 0:
print(a,"is not prime number")
break
else:
print(a,"is a prime number")

Output

17 is a prime number