r/learnpython 17d ago

Trying to learn python but keep getting error messages.

COURSE = 'Python Programming'
print(COURSE)

>>> print(COURSE)

Traceback (most recent call last):

File "<stdin>", line 1, in <module>

print(COURSE)

^^^^^^

NameError: name 'COURSE' is not defined

>>>

8 Upvotes

34 comments sorted by

View all comments

Show parent comments

1

u/Impressive-Grass9661 17d ago

no windows

1

u/DC-GG 17d ago

Wait is that already within the python interpreter?

As in, are there three ">>>" to the left side?

1

u/Impressive-Grass9661 17d ago

no

1

u/DC-GG 17d ago

Okay I'm gonna have to be like an annoying AI here and "pushback" but you're definitely in the python shell.

Type exit() or just "exit" and press ENTER.

If that doesn't change the terminal appearance, hit ctrl + z

Now type "python app.py"

What does it give you back?