My code is in a loop, im getting syntax error on the if statement on the last block, the loop ends just before "Game Over":
computer = int(computer)
if computer == 0:
print(rock)
elif computer == 1:
print(paper)
elif computer == 2:
print(scissors)
print(f"{result1}\n")
print(f"Score: Computador: {scorec} Voce: {scorep}\n")
if int(scorec) == 3:
print("O computador ganhou o jogo!")
replay = (input("Replay? 'Y' ou 'N'").upper()
elif int(scorep) == 3:
print("Voce ganhou o jogo!\n")
replay = (input("Replay? 'Y' ou 'N'").upper()
print("Game Over!")
I messed a lot with indention and failed
error message:
> File "main.py", line 93
> elif int(scorep) == 3:
> ^ SyntaxError: invalid syntax
Aucun commentaire:
Enregistrer un commentaire