+ 2
Whats wrong here?
Why isnt it calling the function if the userinput is 1? https://code.sololearn.com/c2Fy781nzEmK/?ref=app
2 ответов
+ 3
userinput is a string, so you either need to check if userinput == '1' or convert it to an integer: userinput = int(input("Press 1 to attack, 2 to defend: "))
0
Anna ah, i see! Thanks once again!
Also, is it okay if I make a post everytime i run into a problem about something? Like, i will try and find the problem on my own but most times i cant so i end up asking the forums a lot. Is that recommended? Or is it like spamming, which i dont wanna do at all.