I have edited the post so that the code is formatted.
No, I don’t think that it is.
First, though, a quick note for the future. More so than in some other languages, formatting - especially indentation - is very important in Python. When you’re posting code to the forum, please use the code formatting tool. All you need to do is look for the </> icon in the menu bar which appears at the top of the text box while you type.
Press Enter to go to a blank line, click that icon, and you will see this:
Just copy and paste your code directly from the editor into that highlighted portion, and all your lovely formatting, indentation etc, will be kept.
Now, on to the issue at hand.
You have a couple of errors:
You’ve neglected to provide the entire program. The project provides you with several variables up front, such as train_mass. Whilst I can access the project, and so can see what these variables are, not everyone here who might try and help you is a Pro user. It helps if we have all the information, which means posting everything from the editor please.
Missing variables aside, you have some incorrect indentation. For example, you have the following:
def get_force(mass, acceleration):
return mass* acceleration
train_force = get_force(train_mass, train_acceleration)
print("The GE train supplies"+ str(train_force) + "Newtons of force.")
The lines after your return statement should not be indented - or, more accurately, each line should be as far left as the line def get_force...
Your get_work function doesn’t return anything.
That should give you some fixes to be getting on with. Once you’ve fixed that, your code shouldn’t be too far off.