I am trying to make a program that recommends the user an activity to do after a short quiz. It takes tries to figure out how the user is feeling and assigns points to different moods depending on how they feel. At the end it recommends an activity depending on how many points the user received in each mood.
In this piece of code I am trying to add 1 to the 'stressed' variable but I keep receiving this error message "local variable 'stressed' referenced before assignment"
Here is my code
Questions = [
"Was your day stressful?\n(a) Yes\n(b) No\n(c) Kinda\n\n",
"Do you feel happy?",
"Are you sad?",]
happy = 0
sad = 0
stressed = 0
def question1():
answer1 = input(Questions[0])
if answer1 == "a" or "A":
stressed += 1
question2()
if answer1 == "b" or "B":
question2()
if answer1 == "c" or "C":
stressed += 0.5
question2()
question1()
Any help with this would be greatly appreciated. Thanks in advance.