I need help with my python code.

Hello everyone, 

I am very new to python programming. At the moment I have only been writing and building programs within Sublime text. However, this is now limited as sublime doesn’t support interactivity, such as using the input() function. This is the reason for me building my programs using my terminal.

I have now run into a couple of issues. 

Sublime builds this program perfectly: 

name = “John”
print(f"Hello, {name}!")

However, when I try and build it from my terminal I receive an error saying invalid syntax. Please help. 

I know Python on a very basic level but maybe you have old version of Python? Sublime can use different interpreter than your system terminal.

Try this code:

name = "John"
print("Hello,", name)

What do you get when you type the command “python --version”  in a terminal?

What about “python3 --version”?

You might need to use the “python3” command instead of “python”.