I want to create a counter that counts up when inputting "drin-king"
#some help needed here, would be nice #i wanted to built a counter which counts up from 0 when the user inputs the string "drin-king". so rarher the output should count up #but obviously i need to get the x reset to count it up right? #the second problem is how can i count up, because for that the input needs to be inside the def, or not? and when i start counter more than once it stays at 1... number=str(input()) def counter(number): x=0 if number == "drin-king": x=x+1 print ("the score is currently at",x) return x #so is that right here to return x? else: print("you stupid mopfer typed",number,"instead of drin-king") return number #the second problem, the input needs to be reset? counter(number) counter(number) counter(number) #so in general the problem is: x needs to be saved at the current number and the function counter needs to run completely when using it #i woyld be happy if someone could comment a solution. thanks mates. https://code.sololearn.com/clzRb5ZNTTz3/?r