NameErrors and functions in python
问题 I'm constantly getting a NameError Although I already defined a term, The problem is with "day" on line 28. def today(): day = input("What day is it?") if "sunday" in day: day = 0 elif "monday" in day: day = 1 elif "tuesday" in day: day = 2 elif "wednesday" in day: day = 3 elif "thursday" in day: day = 4 elif "friday" in day: day = 5 elif "saturday" in day: day = 6 else: today() today() days_on_vacation = int(input("How many days will you be on vacation? ")) days_to_add_to_day = days_on