python-tutorialsmade

Python program to find prime number or not!

Hello people, here I am writing a Python programme after a very long time. This programme could be useful for cracking interviews or could be useful for school / college students who wish to learn the basic of Python programming.

This programme basically gets an input value from the user and prints whether the input number is either a Prime Number or Not a Prime Number

I hope you know what is a Prime Number already. If you don’t know here is a simple explanation:

A prime number should be exactly #divisible by 2 times only (itself and 1)

Find Prime number – Python program :

Read the comments in the above program to understand. Just copy paste and execute the above snippet to get the output.

Enjoy!

Related Posts

One thought on “Python program to find prime number or not!

Leave a Reply