Learning to program feels mysterious until you write your first working line of code. Python is the friendliest language to start with because its syntax reads almost like plain English. Let us get you running real code in the next few minutes.

Getting Python on your machine Download the latest version from the official Python website and run the installer. On Windows, check the box that says add Python to PATH, which lets you run it from anywhere. On a Mac, the installer handles this for you. To confirm it worked, open a terminal and type python --version. Seeing a version number means you are ready.

Writing your first program Open a plain text editor or a free tool like VS Code, and type this single line:

  • print("Hello, world!")

Save the file as hello.py, then run it from your terminal with python hello.py. The words appear on screen. You just told the computer to do something and it obeyed. That is all programming is at its core.

What just happened The word print is a function, a reusable command that does a job. The text in quotes is a string, a piece of text data. The parentheses pass that data into the function. Understanding this pattern, function plus input, will carry you a long way.

Where to go next Resist the urge to install ten tools or follow a forty-hour course. Write small programs that change one thing at a time. Print your name, then a math result, then ask the user a question with input(). Curiosity and tiny experiments beat any tutorial marathon. You have already started, and that was the hardest step.