I’m having problems with changing my global variables within my function, which also uses user input and (too many) if statements to do so. I keep getting the same error but at different points if I change something.
m=0.0
AH=1.0
ndays=0.0
Day_Count = (ndays," day out of 90")
def AtomicHabits():
wo = input("Did you work out? Y/N? ")
tr = input("Did you study/practice trading? Y/N?")
co = input("Practice coding? Y/N?")
if (wo=='y'):
m=m+1
if (tr=='y'):
m=m+1
if (co=='y'):
m=m+1
if (m==3):
m=.01
elif (m==2):
m=.0066
elif (m==1):
m=.0033
elif (m==0):
m=(-.01)
AH=AH*(1.0+m)
ndays=ndays+1
return AH, m, ndays;
AtomicHabits()
print(“Today’s change is “, m*100, “% on ”, Day_count, bringing total improvement to “, AH )
I’m completely lost, first time posting here so idek how to use the search