Can anyone tell me where the bug is please? Is giving "invalid syntax"

Asked

Viewed 171 times

-2

n = str(input("Informe o nome do aluno: ")

m = int(input("Informe o numero da matricula do aluno: ")

print("O nome do aluno é: %s, o numero da matricula é: %d" %(n,m))
  • Some are missing ) at the end of row 1 and row 2.

  • m = int(input("Informe o numero da matricula do aluno: ") is missing close the end of this line.

  • Please further detail your question, to get a better answer.

  • 1

    Inattention, young man. It’s a good idea to start using Sublime Text with a Python Linter, or some other ide showing syntax errors.

  • Thank you, it was my :T

  • I tried to install the eclipse but was giving error here, I will try another ide

Show 1 more comment

1 answer

1

Try it like this:

n = str(input("Informe o nome do aluno: "))
m = int(input("Informe o numero da matricula do aluno: "))
print("O nome do aluno é: %s, o numero da matricula é: %d" % (n,m))
  • Hahaha damn parentheses

  • @taynan It worked?

  • Worse than not, now you’re making a mistake on the last line :(

  • Now I’ve done it, thank you very much :)

Browser other questions tagged

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