Notation in Python and Possible Variations

Hello fellow coders, I had a question regarding the first step of the Python physics class project. Is f_temp the same as Temp (F) in the function below? I have also seen this throughout the forums so I would like to know if this is some kind of notation. If so, does the computer read both versions the same?

Here is the function I am referring to:

def f_to_c(f_temp):
Temp (C ) = (Temp (F) - 32) * 5/9
return c_temp

A quick way to test would be to run it and see if it works but that doesn’t look like valid Python to me so you’d need to stick with the actual names f_temp etc. If I saw this I’d assume the idea was be to make it easily readable to a human with the Temp (F) version but you’d then need to replace it for the code to run.

1 Like

I see. That makes a lot of sense and you were correct, the code did not run until I put it in the f_temp format. Thank you!

1 Like