Python Program to Check Prime Number

Here you’ll get a python program to envision prime quantity.

A number is named prime quantity if it’s solely partible by one or itself. as an example two, 3, 5, 7, 11, etc are prime numbers.

Below program takes variety as input and checks it’s prime quantity or not.

Python Program to envision the prime quantity

num = int(input("enter a number: "))
for i in range(2, num):
	if num % i  == 0:
		print("not prime number")
	print("prime number")


enter a number: 11
prime number

Comment below if you’ve got any queries associated with higher than python prime quantity program.

Leave a Comment

error: Alert: Content is protected!!