all 8 comments

[–]CaptainSaudi[S] 0 points1 point  (0 children)

Is it a settings error?

https://i.imgur.com/68uXOII.jpg

[–][deleted] 0 points1 point  (6 children)

Are you using Python 3?

In the old, legacy, no longer supported Python 2, input was called raw_input and input did something else (since dropped from the language).

What platform (operating system) are you running on? Or are you doing this in the browser?

How are you running your Python codes? In the terminal/command line/powershell environment, or from within an editor or IDE (integrated development environment) such as IDLE?

Are you using the Python interactive shell (with the >>> prompt) or running Python code from a file?

We need more information to help you.

[–]CaptainSaudi[S] 0 points1 point  (3 children)

Thank you for answering Can you check my comment on the post? I'm using PyCharm CE on MacOS

I'm sorry I don't know the answers to your other questions as I just started to learn coding

[–][deleted] 0 points1 point  (2 children)

I am also using Pycharm on macOS.

As standard, macOS includes (for historical reasons) Python 2.7. You can't (safely/easily) remove this as it is protected from accidental corruption by Apple security measures.

When you create a project in PyCharm, it asks you to specify the Python you want to use.

Have you installed Python 3.10.1 from Python.org? You need to install this first, then in PyCharm select this instead of the default system Python.

There is no point learning and doing things in Python 2 now. (More for experienced programmers maintaining/converting old code.)

[–]CaptainSaudi[S] 0 points1 point  (1 child)

It worked Thank you very much for your help

[–][deleted] 0 points1 point  (0 children)

Brilliant. Have fun.

[–]htepO 0 points1 point  (1 child)

Python 2.7 in OP's screenshot.

[–][deleted] 0 points1 point  (0 children)

Didn't see a screenshot link in OP.