my code does not work python

Asked

Viewed 72 times

-3

for i in x:
    print("Jogador 1, selecione a linha para ataque: ")
    LinhaAtaque1 = int(input("Linha do ataque: "))
    print ("Jogador 1, selecione a coluna para ataque: ")
    ColunaAtaque1 = int(input("Coluna do ataque: ")

    if board2[LinhaAtaque1][ColunaAtaque1] != "0":
        print("Você atingiu um navio!!!!!!!!")
        from random import randint

1 answer

4


The code you sent is not properly formatted... Formatting here, I noticed a syntax error in the excerpt ColunaAtaque1 = int(input("Coluna do ataque: "). Missing a ')' at the end of command.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.