I really cannot figure out how to make the code below work. I am getting this exception:
UnboundLocalError: local variable 'u' referenced before assignment
user_a = "No selection"
def if_statement():
user_choice = input("Pick 1 or 2\n")
if user_choice == "1":
user_a = input("What would you like A to equal?\n")
if_statement()
elif user_choice == "2":
print("A equals: " + user_a)
if_statement()
if_statement()
Can anybody help me on this? I must specify that I am new to Python. Thank you in advance.