Terminal keeps saying there’s something wrong with line 20, “SyntaxError: invalid syntax”.
I spent almost an hour trying to figure out what’s wrong with my code. Could it be a bug? Or maybe something’s wrong with my browser?
UPDATE: I just looked at my own code on Github, it shows on the site that some of the “elif” statements are wrongly indented, however, I assure you every thing is properly formatted on the code editor that I was working on. I guess maybe it’s a bug? -_-
if user_choice == computer_choice:
print(message["tie"])
elif user_choice == options[0] and computer_choice == options[2]:
print(message["won"])
elif user_choice == options[1] and computer_choice == options[0]:
print(message["won"])
elif user_choice == options[2] and computer_choice == options[1]:
print(message["won"])
else:
print(message["lost"])
your if, first elif and else are indented fine. Why the second and third elif are not properly indented is a mystery to me. You seem to understand the concept fine