0
import os
import sys
answer_no = ["No", "N", "no", "n", "NO"]
answer_yes = ["Yes", "Y", "yes", "y", "YEs"]
answer_A = ["A", "a"]
answer_B = ["B", "b"]
answer_C = ["C", "c"]
sword = False
coin = 0
def intro():
  print("""You wake up in the Tavern, Passed out. I see the bartender. He asks if you want a suspicious shiny coin? (Yes/No)""")
  choice = input(">>")
  if choice in answer_yes:
    print("He offers you a shiny coin. This might be useful for later you say. You leave the Tavern")
    coin = 1
    time.sleep(1)
    print(coin)
    intro1()
  elif choice in answer_no:
    print("He stares at you angrily, you decide to leave the Tavern")
    time.sleep(1)
    intro1()
  else:
    print("wrong input")
    intro()

def intro1():
  print(coin)
  print("""You go outside and you see\n You leave the tavern and you see three things. \n A. You see cops staring at you \n B. A clocktower \n C. a trench \n which one do you approach """)
  choice2 = input(">>")
  if choice2 in answer_A:
    if coin == 1:
      print("COIN")
    elif coin == 0:
      print(coin)
      print("NO COIN")
intro()

The coin variable always switches to 0, Even though if he obtains it? How do I make it so once he receives the coin, it stays to 1 when talking to the cops. (New to python, it might be a dumb question)

0 Answers0