Quick answer: to start Python, install the latest Python 3 from python.org (on Windows, check it with python --version or py --version), pick a beginner-friendly editor such as Thonny or the browser-based Google Colab, then create hello.py with a print() line and press Run. Move to VS Code once you’re comfortable. No installation is needed if you start in Colab.
What if the programming language behind ChatGPT-style tools, Netflix recommendations and half the engineering software on Earth was named after a comedy show? It was. Python is named after the British comedy group Monty Python, not the snake, which tells you a lot about the culture: serious power, very little stuffiness.
If you are a student, a mechanical engineer or a complete beginner who wants to get into AI, Python is the first door to open. In this guide we will do three things in about ten minutes of actual work: install Python, understand what an IDE is (and pick one), and run your first program.
Key takeaways
- Install Python 3 from python.org. On Windows, the Python install manager gives you the
pycommand; on Mac and Linux, usepython3. - An IDE (Integrated Development Environment) is the workshop where you write and run code: an editor, a run button, error messages and a debugger in one place.
- Best free starting points: Thonny for absolute beginners, Google Colab if you cannot install anything, and VS Code for long-term use.
- Your first program takes about ten minutes, and indentation (spaces) is part of Python’s grammar.
Why Python for AI and engineering?
Python was created by Guido van Rossum and first released in 1991. It became the favourite of data scientists because it reads almost like English, and because a huge collection of free libraries (NumPy, pandas, scikit-learn, PyTorch and more) does the heavy lifting for you. You write five lines; a library written by experts does the thousand lines underneath.
For engineers it is a bonus: the same language can crunch sensor data from a test bench, plot a gear-ratio chart or train a small model, all without a single semicolon.
Step 1: How to install Python
On Windows:
- Go to the official website, python.org, and open Downloads. For Python 3.14 and newer, the recommended option is the Python install manager; download and run it.
- Follow the prompts to install the latest stable version. The install manager gives you the
pycommand, which runs Python even if it is not added to PATH. If it offers to add Python to PATH, saying yes lets you typepythonas well. - Using the older traditional installer instead? Tick the box that says "Add Python to PATH" before clicking Install Now. Skipping it causes the classic "python is not recognized" error.
On macOS: download the installer from python.org and follow the prompts.
On Linux: Python is usually already installed. Check by typing python3 --version in the terminal.
Check that it worked: open Command Prompt (or Terminal) and type:
python --version
If you see a version number, congratulations, you now own a programming language. On Windows, if python is not recognised, type py --version instead; the py command works even when Python is not on your PATH. On Mac and Linux you may need to type python3 instead of python.
Can’t install anything on your laptop? Skip to Google Colab below. It runs Python in your browser for free.
Step 2: What is an IDE?
IDE stands for Integrated Development Environment. That sounds scary, so here is the plain version: Python is the language, and an IDE is the workshop where you write it.
You could write code in Notepad, the same way you could cut a steel plate with a butter knife. An IDE gives you the proper tools in one place: a text editor that colours your code, a button to run it, error messages that point to the exact line, autocomplete that finishes your words, and a debugger that lets you pause the program and look inside. Same job, far fewer tears.
Step 3: The best IDEs for beginners
| Tool | Best for | Cost | Verdict |
|---|---|---|---|
| Thonny | Absolute first-timers | Free | Very simple, shows what each line does. Great for week one. |
| VS Code | Long-term everyday use | Free | Light, popular, works for Python and much more. Install the Python extension. |
| Google Colab | No install, AI experiments | Free tier | Runs in the browser and can offer a free GPU for small projects (availability varies). |
| Jupyter Notebook / JupyterLab | Data analysis and learning | Free | Run code in small cells and see charts right below. |
| PyCharm Community | Bigger Python projects | Free | Powerful, a bit heavy for beginners. |
My suggestion: start with Thonny or Google Colab this week, and move to VS Code once you are comfortable. Don’t spend three days choosing an IDE. That is called procrastination wearing a productivity hat.
Step 4: Your first program
Open your IDE, create a new file called hello.py and type this:
name = "Engineer"
print("Hello,", name)
# A tiny engineering calculation
wheel_diameter_m = 0.28
rpm = 3000
speed_kmh = 3.14159 * wheel_diameter_m * rpm * 60 / 1000
print("Speed in km/h:", round(speed_kmh, 1))
Press Run. You should see a greeting and a speed of about 158 km/h. Congratulations, you just wrote a program that does real engineering maths.
What did you just learn?
- Variables (
name,rpm) are labelled boxes that hold values. - print() shows something on the screen.
- Comments start with
#. Python ignores them, but your future self will thank you. - Operators like
*and/do the maths.
Two Python quirks that trip up every beginner
1. Spaces matter. Most languages use curly brackets to group code. Python uses indentation (the blank space at the start of a line). If your spacing is wrong, the program refuses to run. Yes, really: whitespace is part of the grammar.
if rpm > 2500:
print("Engine is working hard") # 4 spaces = inside the if
2. Errors are normal. Your first error message will feel like an insult. It isn’t. Read the last line of it first; it usually tells you what went wrong and where. Professional programmers see errors all day long. They just have calmer faces.
A hidden treat
Type import this in Python and press Run. It prints a short poem called The Zen of Python, a list of design principles such as "Readability counts" and "Simple is better than complex". It is one of the language’s famous Easter eggs.
Your one-week starter plan
- Day 1: install Python and run
hello.py. - Day 2: learn variables, numbers and text.
- Day 3: learn
ifandelsedecisions. - Day 4: learn loops (
forandwhile). - Day 5: learn lists and dictionaries.
- Day 6: write your own functions.
- Day 7: build a small tool, like a unit converter or a gear-ratio calculator.
Frequently asked questions
Do I need to be good at maths to learn Python?
No. Basic arithmetic is enough to start. The maths for machine learning can come later, step by step.
Is Python free?
Yes, Python itself and nearly all the tools in this guide are free and open source.
Which version should I install?
Python 3, the latest stable release from python.org. Python 2 is retired and should not be used.
Final thought
You don’t need to be a genius to learn Python. You need a working install, a friendly IDE and the patience to break things and fix them. Which IDE are you starting with? Drop it in the comments, and if you want the next step (variables, loops and lists with engineering examples), let me know.
Sources and further reading
- Python Software Foundation. General Python FAQ (origin of the name, first public release in February 1991).
- Python Software Foundation. Using Python on Windows (the Python install manager and the
pycommand). - Python Software Foundation. Sunsetting Python 2 (Python 2 retired on 1 January 2020).
- Thonny, Python IDE for beginners.
- Microsoft. Getting Started with Python in VS Code.
- Google. Colab FAQ (free tier, resources not guaranteed).
Want a step-by-step plan for learning machine learning?
The 90-Day Machine Learning Roadmap takes you from Python basics to a deployed ML portfolio in 13 weeks, with a plan for every day and a progress tracker. Going for your first ML or data science job? The ML Career Bundle adds an interview kit, Python practice and resume templates.
Prefer video? Watch the tutorials on YouTube · Browse all toolkits




6 responses to “Python for Beginners: Install, Pick an IDE and Write Your First Program”
[…] is like learning to drive in a golf cart. Just start with the real thing. New to Python? Read Python Basics for Beginners […]
[…] Python’s simplicity and flexibility sparked a revolution; today it dominates AI, data science, and backend development. […]
[…] to code as well? Sort out your setup with our Python basics guide first. It takes ten minutes and saves hours of […]
[…] and ML learners who want a real engineering problem. If you are new to Python, start with our Python basics guide first. If you are still deciding what to learn, the ML roadmap for mechanical engineers shows where […]
[…] mix mm and m, or fit the wrong region of a curve, and never warn you. New to Python? Start with our Python basics guide, then follow the ML roadmap for mechanical […]
[…] to running the script? Our Python basics guide gets you set up in ten minutes. To see how hand checks like these catch AI mistakes, read free AI […]