Welcome to the World of Online Learning:
Hello Friends “This blog helps you to learn Python programming concepts. You can learn Python language at your own speed and time. One can learn concepts of Python language by practicing various programs given on various pages of this blog. Enjoy the power of Self-learning using the Internet.”

Write a Python Program to Print all Prime Numbers in an Interval
PROGRAM: Python Program to Print all Prime Numbers in an Interval
/* Python Program to Print all Prime Numbers in an Interval */
# Python program to display all the prime numbers within an interval
lower = 900
upper = 1000
print(“Prime numbers between”, lower, “and”, upper, “are:”)
for num in range(lower, upper + 1):
# all prime numbers are greater than 1
if num > 1:
for i in range(2, num):
if (num % i) == 0:
break
else:
print(num)
OUTPUT :-
Prime numbers between 900 and 1000 are:
907
911
919
929
937
941
947
953
967
971
977
983
991
997