1. Home
  2. Python
  3. Python Examples
  4. Python – Check Prime Number

Python – Check Prime Number

Python Program to Check Prime Number

Write a Python program to check if a given number is a prime number or not.

A prime number is a number that is fully divisible by itself or 1 only. Such as 13 is a prime number, it is not fully divisible by any of the number between 2-12.

Similarily 3, 7, and 11 etc are the prime numbers


Here is a sample Python program:

Execute above script and you will see the result like:

13 is a prime number
Was this article helpful to you? Yes 1 No