Chapter 1

Getting Started with Python

FREE What is Python? Why Learn It?
Article ยท 15 min
๐Ÿ“ Homework

Python is one of the most popular programming languages in the world. It was created by Guido van Rossum in 1991 and designed to be easy to read and write.

Why Python is great for beginners:

  • Simple and readable syntax โ€” it looks almost like plain English
  • Versatile โ€” used for web development, AI, data science, games, and more
  • Huge community โ€” millions of developers use it, so help is everywhere
  • Great for IGCSE and A-Level Computer Science โ€” many exam boards use Python

What you can build with Python:

  • ๐ŸŒ Websites and web apps (Django, Flask)
  • ๐Ÿค– AI and Machine Learning (TensorFlow, PyTorch)
  • ๐Ÿ“Š Data analysis and visualization (Pandas, Matplotlib)
  • ๐ŸŽฎ Games (Pygame)
  • ๐Ÿ”ฌ Scientific computing

๐Ÿ”ง Step 1: Download and Install Python

Go to the official Python website and download the latest version for your operating system:

๐Ÿ‘‰ https://www.python.org/downloads/

  • โœ… Make sure to check "Add Python to PATH" during installation (Windows users โ€” this is very important!)
  • โœ… Choose Python 3.12 or newer
  • โœ… Follow the installer's default settings

After installation, open a terminal (Command Prompt on Windows, Terminal on Mac/Linux) and type:

python --version

You should see something like: Python 3.12.x

๐Ÿ› ๏ธ Step 2: Install VS Code (Recommended Editor)

While you can write Python in any text editor, we strongly recommend VS Code (Visual Studio Code) โ€” it's free, powerful, and widely used by professional developers.

Download VS Code here:

๐Ÿ‘‰ https://code.visualstudio.com/download

Choose the version for your operating system (Windows, macOS, or Linux) and install it.

After installing VS Code, add the Python extension:

  1. Open VS Code
  2. Click the Extensions icon on the left sidebar (or press Ctrl+Shift+X)
  3. Search for "Python"
  4. Install the official Python extension by Microsoft (the one with the blue icon)

Now you're ready to write Python code! Create a new file with a .py extension and start coding.


Python is the perfect first language for your programming journey. Let's get started! ๐Ÿš€


โœ๏ธ
Practice Exercises
Try it yourself!
1 Short Answer

What is Python? Describe it in one sentence.

2 Short Answer

Name TWO real-world applications of Python.

FREE Installing Python & Your First Program
Article ยท 20 min
๐Ÿ“ Homework 6

Now that you have Python installed (see the previous lesson if you haven't done so yet), let's write your very first program!

Your First Python Program

Let's write the classic "Hello, World!" program.

Create a new file called hello.py and add this line of code:

print("Hello, World!")

Now run it in your terminal:

python hello.py

๐ŸŽ‰ Congratulations! You should see:

Hello, World!

Understanding Your First Program

  • print() is a built-in function that displays text on the screen
  • The text inside quotes " " is called a string
  • Python executes your code line by line, from top to bottom

Try another example. Create a file called about_me.py:

print("My name is Alice")
print("I am learning Python!")
print("Python is " + "awesome!")

Run it and see the output. You've just written your first multi-line program!


๐Ÿ’ก Quick Tips for Beginners

  • Always save your .py files before running them
  • Use meaningful file names (no spaces, use underscores instead)
  • Python is case-sensitive โ€” print() works, but Print() does not
  • If you see an error, read it carefully โ€” Python tells you exactly what went wrong and on which line

โœ๏ธ
Practice Exercises
Try it yourself!
1 Code

Write a Python program that prints: My name is [Your Name]

2 Short Answer

What does the print() function do in Python?