To print the prime numbers in range program:

```
lower = int(input("Enter lower range: "))   
upper = int(input("Enter upper range: "))

for num in range(lower,upper + 1):

   # prime numbers are greater than 1

   if num > 1:

       for i in range(2,num):

           if (num % i) == 0:

               break
       else:
           print(num)

```

The output for the above is:

```
Enter lower range: 3
Enter upper range: 10

3
5
7

```

But,When I tried with the below code, the output is varying.

```
min=int(input("enter the min num"))

max=int(input("Enter the max num"))

for i in range(min,max+1):

    if i > 1:

        for j in range(2,i):

            if (i%j) == 0:

                break

            else:

                print(i)

```

Output:

```
enter the min num: 3
Enter the max num: 10

3
5
5
5
7
7
7
7
7
9

```