Setting Up Your Python Workspace
Simple guide to get Python running on your computer
What You'll Learn
- Installing Python on your computer
- Using Google Colab (no installation needed!)
- Writing your first Python code
The Easiest Way: Google Colab
Don't want to install anything? Use Google Colab!
Steps:
- Open colab.research.google.com
- Sign in with your Google account
- Click "New Notebook"
- Start coding!
Try it now:
print("Hello from Colab!")Type this in a cell and press Shift + Enter to run it.
Why use Colab?
- Free and works in your browser
- No installation needed
- Google saves your work automatically
- Perfect for learning
Installing Python on Your Computer
Want to work offline? Install Python locally.
For Windows:
- Go to python.org
- Click "Downloads"
- Download Python (latest version)
- Run the installer
- ✅ Check "Add Python to PATH"
- Click "Install Now"
For Mac:
- Go to python.org
- Click "Downloads"
- Download Python for Mac
- Open the downloaded file
- Follow the installation steps
Check if it worked:
Open Terminal (Mac) or Command Prompt (Windows) and type:
python --versionYou should see something like "Python 3.11.0"
Where to Write Python Code
You have 3 simple options:
1. Google Colab (Easiest)
- Open colab.research.google.com
- Create new notebook
- Start coding
2. IDLE (Comes with Python)
- Search "IDLE" on your computer
- Opens automatically after installing Python
- Simple editor for beginners
3. VS Code (Advanced)
- Download from code.visualstudio.com
- Install "Python" extension
- Create a file ending in
.py
Your First Python File
Using IDLE or any text editor:
- Open IDLE or Notepad
- Type this:
name = "Your Name"
print("Hello,", name)
print("Welcome to Python!")- Save as
hello.py - Run it!
Output:
Hello, Your Name
Welcome to Python!
Quick Tips
Don't worry about:
- Complex editors
- Installing lots of tools
- Understanding everything at once
Focus on:
- Writing simple code
- Seeing it work
- Learning one step at a time
Recommended for beginners: Start with Google Colab. It's free, easy, and you can learn without worrying about installation problems.
Common Problems
Problem: "Python not found"
- Windows: You forgot to check "Add to PATH" during installation
- Solution: Reinstall Python and check that box
Problem: Can't run code
- Make sure you saved the file with
.pyextension - Try Google Colab instead
Problem: Getting errors
- That's normal! Everyone gets errors
- Read the error message slowly
- Google the error (seriously, everyone does this)
What's Next?
Now that you have Python running, let's write some real code!
You're ready to start learning Python basics.