Q6 Grand Finale Syntax Error


When I put the standard answer to my terminal, it said Syntax error, and the error arrow pointed to the quotation mark. However, this code works well on Code Academy’s shell.

Could anyone please tell me the reason?


Hi @digitalwhiz04723,

Are you using Python 3 on your terminal? If so, then print is a function, therefore you would need to supply the expressions to be output as arguments within parentheses. For example, if you wanted to output variables x and y, you could do this in Python 2 …

print x, y

… and this in Python 3 …

print(x, y)

For the Grand Finale exercise, the entire expression to be output would be placed within a pair of parentheses.

Try it out on your terminal; if it doesn’t work, post the code so we can take a look at it. Also verify what version of Python you are using.


Yes! It works. Thank you very much for your reply.