I just had written few lines of code and below is the one:

```
def fun(x,y):
    op=input("Please enter the operator: ")
    if op=='*':
        y=y*x
    if op=='+':
        y=y+x
    if op=='-':
        y=x-y
    if op=='/':
        y=x/y
    return y

for n in range(1,999):
    if n==1:
        try:
            a=int(input("Please enter the value 1: "))
            b=int(input("Please enter the value 2: "))

            if a not in ('*','/','+','-') or b not in ('*','/','+','-'):
                f=fun(a,b)
                break
        except:
            print("Please enter the proper number")

        print(f)            

```

The value of f has not printed, even though i have given correct input. is this because of exception clause.if so, what should we do to print values outside, when they are defined inside try/except clause.

Below is the output displayed.

```
Please enter the value 1: 1

Please enter the value 2: 2

Please enter the operator: *

```