Python program to check prime number | Python Bootcamp

Introduction

In this post, you will learn how to find prime numbers in python.

How to find prime number in python❓

A prime number is greater than 1 and has no other factors except 1 and some prime numbers are 2,3,57 etc but 6 is not a prime number that is because 2 x 3 = 6.

Before we get into the source code., You need to know about ????????

  1. Python if else
  2. Nested statement
  3. datatype

Source code

Output


Also Read: Check a number is odd or even

Also Read: Check a number is positive negative or zero