Print first n prime numbers in python

Print first n prime numbers in python

Here you will get an example program to print first n prime numbers in Python programming lab.

 

Program code to print first n prime numbers in python

Output

How much Prime number you want to find : 5
First 5 prime numbers:
[2, 3, 5, 7, 11]

 

 

Check out our other Python programming examples

 

 

Leave a Comment

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

Scroll to Top