Skip to content
← Back to Community
Why "invalid syntax"?
Profile icon
DarthVilgot

What is "invalid syntax" in this code (it's my first time coding, that's why it's spaghetti code)? It keeps saying line 41 is wrong.

https://repl.it/@DarthVilgot/Calculator-1

Answered by adriaangijssen [earned 5 cycles]
View Answer
Voters
Profile icon
Ali-HaiderHaide
Profile icon
AndreiPopescu6
Profile icon
DarthVilgot
Comments
hotnewtop
Profile icon
adriaangijssen

You're missing a ) on line 40, because you start two (

Profile icon
DarthVilgot

@adriaangijssen thx and nowadays line 43?

Update: I fixed it, python associated calc() with only two arguments because calc(x, operator) was def before calc(x, operator, y).