N
N
novichok1514132020-09-07 18:22:42
Python
novichok151413, 2020-09-07 18:22:42

Gives an error when python code is valid in VS code, why?

There is a code:

age = 23
print(age)

There is an error:
>>> print(age)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'age' is not defined

At the same time, this error is only in VS code, what should I do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Kuts, 2020-09-07
@novichok151413

Enter the text of the program in one window, and execute other code in the console.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question