Getting Your Computer Ready
To write and run Python code, we need to install Python on your computer.
Think of Python as your personal translator. It takes the simple English instructions you write and translates them into machine language (ones and zeros) that your computer can understand.
How to Install on Windows
Follow these simple steps:
- Go to the official website: python.org/downloads.
- Click the big yellow button to download the latest version for Windows.
- Open the downloaded file to start the installation.
- CRITICAL STEP: At the very bottom of the first screen, you will see a small checkbox that says "Add python.exe to PATH". You MUST check this box.
Why is this checkbox important? If you forget to check it, your computer will not know where to find Python when you try to run your code later. It will show a scary error: "python is not recognized".
How to fix if you forgot: Don't worry! Just open the downloaded installer again, click Modify, check the box, and you are good to go!
- After checking the box, click "Install Now" and wait for it to finish.
How to Install on macOS (Mac)
- Go to python.org/downloads and download the installer for macOS.
- Open the downloaded file.
- Click "Continue" and follow the standard installation steps until it finishes. (Mac users do not need to worry about any PATH checkbox!)
Did it work? Let's check!
Let's make sure Python is installed correctly using your computer's terminal (a simple text screen).
- Windows: Search for
cmdin your Start Menu and open "Command Prompt". - Mac: Search for
Terminalin Spotlight and open it.
Type this command exactly and press Enter:
python --version
If it worked, you will see a message like Python 3.12.3 (the version number might be different, which is fine). This means your translator is ready!
What's Next?
Now that Python is installed, we need a clean, smart notebook to write our code in the next lesson!