Wednesday, November 1, 2017

Ex No: 8 First n Prime Numbers



Aim
            To write a python program to generate n prime numbers
Algorithm
Step1:Start
Step2:Get the upper limit and lower limit upto which the prime numbers must be displayed
Step3:Let it be lower and upper.
Step4:For each number ‘num’ from lower till upper
Step4.1:Check if ‘num’ is prime( not divisible by number other than one and itself)
Step4.2:If prime, display the number
Step4.3:Else move to next number
Step5:Stop

https://drive.google.com/file/d/0ByMcz7t6A0giSzlzU3prYTJkVms/view?usp=sharing



No comments:

Post a Comment