Syntaxerror: Invalid Syntax

Asked

Viewed 57 times

-1

I was creating a tool in Python, but when I went to run it gives this error. Excerpt from the code:

while True:
        opcao = int(input("Digite a opcao desejada: ")
        if opcao == 1:
            arquivo = open("textos.txt", 'w')

When I spin it shows up:

inserir a descrição da imagem aqui

  • 1

    Missing close a parenthesis in previous line

1 answer

0

Missing close a parenthesis, see:

while True:
    opcao = int(input("Digite a opcao desejada: "))
    if opcao == 1:
        arquivo = open("textos.txt", 'w')

Browser other questions tagged

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