
파이썬 기초공부 중인데 강사님이 하신대로 따라했는데 오류가 납니다.
이유가 뭔지 알 수 있을까요?
작성한 코드 및 에러 메세지
PC@DESKTOP-2B33450 MINGW64 ~/Desktop/sparta
$ C:/Users/PC/AppData/Local/Programs/Python/Python38/python.exe
Python 3.8.6 (tags/v3.8.6:db45529, Sep 23 2020, 15:52:53) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> hey()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'hey' is not defined
>>> C:/Users/PC/AppData/Local/Programs/Python/Python38/python.exe c:/Users/PC/Desktop/sparta/pythonprac/hello.py
File "<stdin>", line 1
C:/Users/PC/AppData/Local/Programs/Python/Python38/python.exe c:/Users/PC/Desktop/sparta/pythonprac/hello.py
^
SyntaxError: invalid syntax
>>> C:/Users/PC/AppData/Local/Programs/Python/Python38/python.exe c:/Users/PC/Desktop/sparta/pythonprac/hello.py
File "<stdin>", line 1
C:/Users/PC/AppData/Local/Programs/Python/Python38/python.exe c:/Users/PC/Desktop/sparta/pythonprac/hello.pyesktop/sparta/pythonprac/hello.py
^
SyntaxError: invalid syntax esktop/sparta/pythonprac/hello.py
>>> C:/Users/PC/AppData/Local/Programs/Python/Python38/python.exe c:/Users/PC/Desktop/sparta/pythonprac/hello.py esktop/sparta/pythonprac/hello.py
File "<stdin>", line 1
C:/Users/PC/AppData/Local/Programs/Python/Python38/python.exe c:/Users/PC/Desktop/sparta/pythonprac/hello.py
^
SyntaxError: invalid syntax
>>> C:/Users/PC/AppData/Local/Programs/Python/Python38/python.exe c:/Users/PC/Desktop/sparta/pythonprac/hello.py
File "<stdin>", line 1
C:/Users/PC/AppData/Local/Programs/Python/Python38/python.exe c:/Users/PC/Desktop/sparta/pythonprac/hello.pyesktop/sparta/pythonprac/hello.py
^
SyntaxError: invalid syntax esktop/sparta/pythonprac/hello.py
>>> C:/Users/PC/AppData/Local/Programs/Python/Python38/python.exe c:/Users/PC/Desktop/sparta/pythonprac/hello.py esktop/sparta/pythonprac/hello.py
File "<stdin>", line 1
C:/Users/PC/AppData/Local/Programs/Python/Python38/python.exe c:/Users/PC/Desktop/sparta/pythonprac/hello.py
^
SyntaxError: invalid syntax
>>>
