yes you can use a foe loop and in if condition use if number is divisible by 2 don't print but if number is not divisible y 2 print it
lower = int(input("Enter the lower value:"))
upper = int(input("Enter the upper value:"))
for number in range(lower,upper+1):
if number>1:
for i in range(2,number):
if (number%i)==0:
break
else:
print(number) code pro zone
you can use if else statements to check the given condition of numbers this if will check all the vales one by one if you want to print those values you can different print statements separately for prime numbers or even numbers
for number in range(lower,upper+1):
if number>1: