Python 3 physics class project, syntax error

I’m stuck on this project and cant figure out what the syntax error is. I keep getting the following message:

File “script.py”, line 27
def get_energy(mass, c = 3*10**8)
^
SyntaxError: invalid syntax

It marks line 27 as the issue but I don’t see anything wrong with it.

Hello, @aratchen, and welcome to the Codecademy Community!

Your mistake precedes line 27. Take a careful look there, where something is unfinished. As a result of that, this function header is not accepted when the Python interpreter encounters it:

def get_energy(mass, c = 3*10**8):
1 Like

I’m guessing you are referring to the missing parenthesis on line 25? I just notice that and fixed it and now I am receiving this error message:

File “script.py”, line 27
def get_energy(mass, c = 3*10**8)
^
SyntaxError: invalid syntax

Something is also missing from that function header. I mistakenly fixed it in my previous post. :laughing:

1 Like

ah the colon thank you!

1 Like

There is still a remaining problem here:

print("The GE train supplies " + train_force + " Newtons of force.")

yup figured that out need to convert train_force to a string :blush:

1 Like