No history yet

Introduction to Python

What Is Python?

Python is a high-level programming language known for its clear, readable syntax. Think of it less like a cryptic code and more like a set of structured English instructions for your computer. This design makes it one of the most beginner-friendly languages to learn.

The core idea is simple: code should be easy to read and write. This focus on simplicity allows you to focus on solving problems rather than getting stuck on complicated language rules.

It’s a versatile tool used for everything from building websites and analyzing data to creating artificial intelligence programs. Its power comes from its vast collection of pre-written code, called libraries, which help you perform complex tasks with just a few lines of code.

Where Did It Come From?

Python was created in the late 1980s by Guido van Rossum in the Netherlands. He wanted to design a language that would be a successor to ABC, another language he had worked on, but with a focus on exceptional readability. The first version was released in 1991.

Over the years, a large and active community grew around Python, contributing to its libraries and making it more powerful. This community support is one of the main reasons for its widespread adoption in so many different fields.

Lesson image

Its popularity has soared, especially in the fields of data science, machine learning, and web development. Companies like Google, Netflix, and Spotify use it extensively in their operations.

Setting Up Your Workspace

To start writing Python, you need a place to write and run your code. We'll use an Integrated Development Environment, or IDE. An IDE is like a word processor for programmers, bundling a text editor, a code runner, and debugging tools into one application.

IDE

noun

An Integrated Development Environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development.

We will use Thonny, an IDE designed specifically for beginners. The best part is that Thonny comes with Python already included, so you don't have to install them separately.

Here’s how to get it set up:

  1. Go to the official Thonny website at thonny.org.
  2. Find the download link for your operating system (Windows, macOS, or Linux) and click it.
  3. Once the download is complete, run the installer. The on-screen instructions are straightforward; you can usually accept all the default settings.

That's it! You now have a complete Python development environment.

Lesson image

Let's write your first program. Open Thonny. You'll see two main areas. The top part is the editor, where you write your code. The bottom part is the shell, where you see the output.

In the editor, type the following line:

print("Hello, World!")

Now, click the green "Run" button (it looks like a play symbol). Thonny will ask you to save the file first. Save it as hello.py.

After you save it, you should see Hello, World! appear in the shell below. Congratulations, you've just run your first Python program!

Quiz Questions 1/5

What is a primary design philosophy of the Python language?

Quiz Questions 2/5

According to the lesson, what is an IDE (Integrated Development Environment)?

You've taken your first step into the world of Python. You know what it is, where it came from, and how to get your own coding environment up and running.