Sorry I couldn't find a better formulation of what I mean't, So basically I'm trying to create a script that auto-complete a math problem, but now I'm stuck and couldn't find a good answer on forums.
Here how it looks
print("That's how you type the function : f(x) = a*sin(b(x-h))+k\nDon't use space!")
print("If the value of the variable is unknown type 'None'")
import math
def start():
    y= input("y = ")
    sct = input("sin, cos, tan = ")
    a= input("a = ")
    b= input("b = ")
    x= input("x = ")
    h= input("h = ")
    k= input("k = ")
    print("So if I understand here the problem you want to solve")
    print(y,"=",a,sct,"(",b,"(",x, "-" ,h,"))",k)
    QUA = input("Yes or No? : ")
    if QUA == "Yes":
            print("Good")
    elif QUA == "No":
        start()
start()
So the part where I'm stuck at is that I'm asking a question and if you say "Yes" it continues the script. If you say "No" it goes back to start(). So when I try after that to use the variables it just says
>>> print(y)
Traceback (most recent call last):
  File "<pyshell#34>", line 1, in <module>
    print(y)
NameError: name 'y' is not defined
Help anyone?
 
     
    