How to link inputs to new questions in Python (troubleshooting program)?
<p>I was programming a troubleshooter on python and I have been finding it really hard to link inputs to new questions:</p>

<pre><code>   Question 1
   print("Has your car got a flat tyre? 1. Yes 2. No")
   choice=input("1/2")
   if choice == "1":
        goto (Question 2) #How do I link this input
   elif choice == "2":
        goto (Question 3)
   else:
        print("Answer not applicable")
   Question 2                 #Into this question?
   print("Have you taken your car to the petrol station? 1. Yes 2. No")
   choice=input("1/2")
   if choice == "1":
       goto (Question 4)
   elif choice == "2":
       goto (Question 5)
   else:
       print("Answer not applicable")
   Question 3
   print("Has your car recently had an MOT? 1. Yes 2. No")
   choice=input("1/2")
   if choice == "1":
       goto (Question 6)
   elif choice == "2":
       goto (Question 7)
   else:
       print("Answer not applicable")
</code></pre>

<p>I need to know how to do this before I go further with my project. All help is appreciated.</p>

<p>Python does not support labels and goto. What you should be doing is something like the code below.</p>

<pre><code>QUESTION_1 = "Has your car got a flat tyre? 1. Yes 2. No"
QUESTION_2 = "Have you taken your car to the petrol station? 1. Yes 2. No"
QUESTION_3 = "Has your car recently had an MOT? 1. Yes 2. No"
QUESTION_4 = "" 
QUESTION_5 = "" 
QUESTION_6 = ""
QUESTION_7 = "" 

def ask_question(question):
    print(question)
    answer = input()
    return answer

def check_answer(question, answer):
    if question == QUESTION_1 and answer == "1":
        question = QUESTION_2
    elif question == QUESTION_1 and answer == "2":
        question = QUESTION_3
    elif question == QUESTION_2 and answer == "1":
        question = QUESTION_4
    elif question == QUESTION_2 and answer == "2":
        question = QUESTION_5
    elif question == QUESTION_3 and answer == "1":
        question = QUESTION_6
    elif question == QUESTION_3 and answer == "2":
        question = QUESTION_7
    else:
        print("Answer not applicable")

    return question

question = QUESTION_1

while True:
    answer = ask_question(question)
    question = check_answer(question)
</code></pre>

python design