Header Ads

Python Program to Print All Prime Numbers in an Interval Using For Loop

In this Program We Learn How to Print All Prime Numbers in an Interval Using For Loop in Python


Example : Code Program


l = int(input("Enter Strating Range:"))
h = 
int(input("Enter Ending Range:"))
print("Prime number ",l," to ", h, " are")
for in range(l, h+1):
    if n>1:
        
for in range(2, n):
            
if (n%i) == 0:
                
break
        else
:
                
print(n, end=" ")




Output

Python,  Program, Find,  Prime, Number, While, Loop, prime number, find prime number, number is Prime, not prime number, Python Program, Python Program to Find Prime Number ,Python Program to Find Prime Number Using While Loop, Python Program to Print All Prime Numbers in an Interval Using While Loop

Java Program Code

Java Program to Print All Prime Numbers in an Interval

No comments

Powered by Blogger.