I have a question about python in VS Code. In IDE spyder I can define a function and test it in the terminal. For example:
def test(a):
return a + 1
If I write in terminal test(4)
it will return 5. How can I make this work in VS Code? The same example in VS Code returns this:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'test' is not defined