I am running python 3.6 on Linux. When I use the python shell to test the code, it works as it is supposed to do. However, if run from the linux terminal, I get a name error.
#!/usr/bin/python
print("Hi")
name = input("What\'s your name?")
print (name, "is a cool name")
Then after inputting a name from the linux terminal, I get the following error:
Traceback (most recent call last):
File "./test.py", line 3, in <module>
name = input("What\'s your name?")
File "<string>", line 1, in <module>
NameError: name 'Matt' is not defined
I know that if run on python 2, you need to use raw input, however this is not used in python 3. Is there another line of code so that the linux terminal accepts it, like #!/usr
?