Why does it say the 'forename' variable is not defined? code in description
try: forename = str(input("Please tell us your first name: ")) except EOFError as e: print(e) try: Surname = str(input("Please tell us your surname: ")) except EOFError as q: print(q) print("Hello",forename,Surname) #tells us full name which was inputted def hru(str): #The function which asks how are you howareyou = str(input("How are you? ")) if howareyou == "Good": print("Glad to hear that" ,forename, ":D") ocul(str) elif howareyou == "good": print("glad to hear that" ,forename, ":d") ocul(str) elif howareyou == "Fine": print("Good :)") elif howareyou == "fine": print("godo ;0") elif howareyou == "Bad": print("Sorry to hear that" ,forename, " :(") baday(str) elif howareyou == "bad": print("sorry ttpo hearthat" ,forename, ";9") baday(str) else: print("Not a valid option" ,forename, " :)") #if there is an incorrect input this triggers, restarting the 'how areyou' function hru(str) hru(str)