This is the link for the project: link here
I have a hard time understanding why the line of code below gives me ‘None’ when I run it:
train_force = get_force(train_mass,train_acceleration)
Both train_mass and train_acceleration are defined at the beginning of the code, so I added them to the get_force() function to test if it runs correctly, but instead of giving me the value I expect (226800) it gives me None.
I even tried writing get_force(22680,10) and again the result is None when I try to print it.
Is there an error in my function, is this a data type issue, or something completely different I have overlooked? If someone could explain this to me, I’d be really grateful as I am stuck and not sure why.
Please find the whole code below.
train_mass = 22680 train_acceleration = 10 train_distance = 100 bomb_mass = 1 #farenheit to celsius conversion def f_to_c(f_temp): c_temp = (f_temp - 32) * 5/9 return print(c_temp) f100_in_celsius = f_to_c (100) #celsius to farenheit conversion def c_to_f(c_temp): f_temp = c_temp *9/5 +32 return print(f_temp) c0_in_farenheit = c_to_f(0) #force equation def get_force(mass,acceleration): return print(mass*acceleration) train_force = get_force(train_mass,train_acceleration) print(train_force) print('The GE trains supplies ' + str(train_force) + ' Newtons of force.')