This is the python program to display the prime numbers upto the N limit, that N limit is dependent on own choice.
This is the simplest Python program to display the prime numbers up to the series based on their own choice. The limit to select prime numbers depends on the individual's choice. Generally, the prime numbers in the numbers system are defined as the "Numbers which are divisible by only with one and with its number is called the "prime numbers".In Python, we have logic and suitable program code to represent or display the prime numbers. Now we are using Python program to generate the prime numbers series up to the limit of our own choice. The prime numbers start from 1 to N numbers. For example, number 7 is the prime number, because it is only divisible by one and its own, which means it is divisible by 1 and 7, respectively.
lower=int(input("Enter lower range:")) upper=int(input("Enter upper range:")) print("Prime numbers between", lower,"and", upper,"are:") for num in range(lower,upper+1): if num>1: for i in range(2,num): if(num%i==)0: break else: print(num)
Submitted by Karthik Nagisetty (karthik)
Download packets of source code on Coders Packet
Comments