while True :
    try :
        num1= float(input("Enter the first num: "))
        
        operator=input("Enter the operator (+,-,*,/): ")
       
        num2= float(input("Enter the second num: "))

        if operator=='+':
            result=num1+num2
        elif operator=='-':
            result=num1-num2
        elif operator=='*':
            result=num1*num2
        elif operator=="/":
            if num2==0:
                print("Cannot divide by Zero")
                continue
            else:
                result=num1/num2
        else:    
            print("invalid operator")
            continue
        print("the result is :", result)

        choice=input("Do you want to continue (yes/no)? ".lower())
        if choice!="yes":
            break
    except ValueError:
        print("Please enter valid numerical values ")
        continue