Я использую Python 3.8.2 на Mac с использованием vscode.
Код:
Код: Выделить всё
name = input("Name: ")
print("hello, " + name + "!")
Код: Выделить всё
bashkim@Bashkims-MBP test % python name.py
Name: Bashkim
Traceback (most recent call last):
File "name.py", line 1, in
name = input("Name: ")
File "", line 1, in
NameError: name 'Bashkim' is not defined
Код::
Код: Выделить всё
name = input()
print(f"hello, {name}!")
Код: Выделить всё
bashkim@Bashkims-MBP test % python name.py
File "name.py", line 2
print(f"hello, {name}!")
^
SyntaxError: invalid syntax
Подробнее здесь: https://stackoverflow.com/questions/653 ... -nameerror
Мобильная версия