Python Program to Check Prime Number

Python program to check prime number

Here you will learn the Python program to check Prime Number using for loop.

 

A prime number is a positive integer number greater than 1 that has only two positive divisors: 1 and itself.

for example:

3,5,7,11,13,17….

 

Python program to check prime number using for loop

Output 1

Enter a number: 15
15 is not a prime number

Output 2

Enter a number: 13
13 is a prime number

 

 

Check out our other Python examples

 

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top