Python is one of the most beginner-friendly and powerful programming languages you can learn today. Whether you’re diving into web development, data science, automation, or just want to explore coding, Python is a great starting point.
In this post, we’ll walk you through how to:
- Install Python
- Set up a code editor
- Write and run your first Python program
Let’s get started!
Step 1: Install Python
Windows / macOS / Linux
- Go to the official website:
👉 https://www.python.org/downloads/ - Download the latest version:
Click on the button to download the latest version of Python (e.g., Python 3.12.x). - Run the installer:
- ✅ On Windows, make sure to check the box that says “Add Python to PATH” before clicking “Install Now.”
- ✅ On macOS, follow the installation prompts.
- ✅ On Linux, you can usually install Python via terminal:
sudo apt update sudo apt install python3
- Verify the installation:
Open a terminal or command prompt and type:python --versionorpython3 --versionYou should see something like:Python 3.12.0
Step 2: Choose a Code Editor
While you can write Python in any text editor, using a proper code editor makes things easier.
Recommended Editors:
- VS Code (free and lightweight): https://code.visualstudio.com
- PyCharm (powerful, with a free Community Edition): https://www.jetbrains.com/pycharm/
After installing, open your editor and create a new file called hello.py.
Step 3: Write Your First Python Program
In your hello.py file, type the following code:
print("Hello, world!")
This line tells Python to print the phrase Hello, world! to the screen.
Step 4: Run the Program
Option 1: Using Terminal or Command Prompt
Navigate to the folder where your hello.py file is located, then run:
python hello.py
or
python3 hello.py
You should see:
Hello, world!
Option 2: Run Inside Your Code Editor
If you’re using VS Code, right-click in the editor window and click “Run Python File in Terminal”.
If you’re using PyCharm, click the green triangle (▶️) next to your code.
Congratulations! 🎉
You’ve just written and run your very first Python program. From here, the possibilities are endless. Try changing the message, or explore input/output, variables, and basic math next.
What’s Next?
Here are a few beginner-friendly projects you can try:
- A simple calculator
- A number guessing game
- A to-do list app (with text-based interface)
Python is your canvas. Happy coding!
Did you find this helpful? Feel free to share and leave a comment with your first program!



Leave a comment