Skip to content

Latest commit

 

History

History
510 lines (296 loc) · 12.2 KB

File metadata and controls

510 lines (296 loc) · 12.2 KB

Lesson 01 — What is Python?

🌐 Language: English | فارسی


Overview

Every programming journey starts with choosing a programming language.

Before writing your first line of code, it's important to understand what Python is, why millions of developers use it, and where it can be applied in the real world.

In this lesson, you'll discover the story behind Python, its strengths, and why it has become one of the most popular programming languages in the world.


Learning Objectives

By the end of this lesson, you will be able to:

  • Explain what Python is.
  • Understand the purpose of a programming language.
  • Describe the main advantages of Python.
  • Identify common areas where Python is used.
  • Understand why Python is an excellent language for beginners.

Part 1 — Introduction

What is Programming?

Computers are incredibly fast, but they are not intelligent.

They cannot think, make decisions, or solve problems on their own.

Instead, they follow instructions given by humans.

Programming is the process of writing those instructions.

A program is simply a collection of instructions that tells a computer what to do.

For example:

  • Display a message.
  • Calculate a number.
  • Save information.
  • Open a website.
  • Play a video.

Everything a computer does begins with instructions written by a programmer.


What is Python?

Python is a high-level, general-purpose programming language created to make programming easier, more readable, and more enjoyable.

Unlike low-level languages that are closer to machine code, Python allows developers to write code that looks much more like human language.

For example:

print("Hello, World!")

Even if you've never programmed before, you can probably guess what this code does.

That's one of Python's greatest strengths.

Its syntax is clean, simple, and easy to understand.

Python allows programmers to focus on solving problems instead of worrying about complicated language rules.


Lesson Summary

  • Programming is the process of giving instructions to a computer.
  • A program is a collection of instructions.
  • Python is a programming language.
  • Python was designed to be simple and readable.
  • Python allows beginners to focus on problem-solving instead of complex syntax.

Part 2 — Why Learn Python?

Have you ever wondered why Python is one of the most popular programming languages in the world?

The answer lies in its simplicity, versatility, and the enormous community that supports it.

Today, Python is used by millions of developers, students, researchers, and companies across the globe.

Whether you want to build websites, analyze data, create artificial intelligence systems, or automate repetitive tasks, Python provides the tools to achieve your goals.


Why is Python Popular?

Python became popular because it removes many of the difficulties beginners usually face when learning programming.

Instead of spending time understanding complicated syntax, you can focus on learning programming concepts and solving problems.

This makes Python one of the best languages for learning computer science and software development.


Advantages of Python

1. Easy to Learn

Python has a simple and readable syntax.

Many Python programs look almost like plain English, making them easier to understand.


2. Easy to Read

Python emphasizes clean and organized code.

Readable code is easier to maintain, debug, and improve.


3. Cross-Platform

Python programs can run on:

  • Windows
  • macOS
  • Linux

without major changes.


4. Huge Standard Library

Python comes with hundreds of built-in modules that help you perform common tasks without writing everything from scratch.


5. Large Community

Millions of developers use Python.

If you encounter a problem, chances are someone has already solved it.

This means you'll find countless tutorials, videos, articles, and discussions online.


Lesson Summary

  • Python is one of the world's most popular programming languages.
  • Its simplicity makes it an excellent choice for beginners.
  • Python works on multiple operating systems.
  • It has a large community and an extensive standard library.
  • Learning Python opens the door to many different career paths.

Part 3 — The History of Python

Meet Guido van Rossum

Guido van Rossum

Figure 1 — Guido van Rossum, creator of the Python programming language.

Every programming language has a story, and every story has a creator.

Python was created by a Dutch software engineer named Guido van Rossum.

In the late 1980s, Guido was working on different software projects and noticed that many programming languages were either too difficult to learn or too complicated for everyday programming.

He believed programming should be simple, readable, and enjoyable.

With that vision in mind, he started working on a new programming language during the Christmas holidays of 1989.

That small personal project eventually became one of the most influential programming languages in the world.


Why Was Python Created?

Guido wanted a language that would allow programmers to:

  • Write less code.
  • Read code more easily.
  • Focus on solving problems instead of language complexity.
  • Increase productivity.

Instead of creating a language only for experts, he wanted to build one that everyone could learn and use.

Today, those original goals are still reflected in Python's philosophy.


Why Is It Called "Python"?

Many people think Python was named after the snake.

Interestingly, that is not true.

Guido was a fan of a British comedy television show called Monty Python's Flying Circus.

When choosing a name for his new language, he wanted something short, unique, and memorable.

He chose Python as a tribute to that comedy group.

This is also why the Python community often uses humor in its documentation and examples.


The Evolution of Python

Python has continuously evolved since its first public release.

Some important milestones include:

Year Event
1989 Development of Python begins
1991 First public release
2000 Python 2.0 released
2008 Python 3.0 released
Today Python is one of the world's most popular programming languages

Each new version introduced improvements, better performance, and new features.


Python 2 vs Python 3

For many years, Python existed in two major versions:

  • Python 2
  • Python 3

Although Python 2 was extremely popular, it had several design limitations.

Instead of keeping those limitations forever, the Python developers decided to redesign parts of the language and released Python 3.

Because of these improvements:

  • Python 2 officially reached its end of life in 2020.
  • Modern development uses Python 3.
  • Every new learner should start directly with Python 3.

Throughout this roadmap, every example and every project will use Python 3.


Part Summary

  • Python was created by Guido van Rossum.
  • Development began in 1989.
  • Python was designed to be simple and readable.
  • The name "Python" comes from Monty Python's Flying Circus, not the snake.
  • Python 3 is the modern and recommended version for all new learners.

Part 4 — Features of Python

Python is one of the most popular programming languages in the world because it combines simplicity with power.

Its features make it suitable for beginners, professionals, researchers, and large companies alike.

Let's explore the characteristics that make Python unique.


1. Simple Syntax

One of Python's biggest advantages is its simple syntax.

Python code is clean and easy to understand, allowing developers to focus on solving problems instead of remembering complicated language rules.

For example:

print("Hello, World!")

Even someone with no programming experience can often guess what this program does.


2. Readable Code

Python was designed with readability in mind.

Good code is not only written for computers but also for humans.

Readable code is:

  • Easier to understand
  • Easier to debug
  • Easier to maintain
  • Easier to improve

This is one of the reasons Python is widely used in both education and industry.


3. Interpreted Language

Python is an interpreted programming language.

Instead of compiling the entire program before execution, Python executes your code step by step.

This allows developers to:

  • Test code quickly
  • Find errors more easily
  • Develop software faster

4. Cross-Platform

Python programs can run on different operating systems with little or no modification.

Supported platforms include:

  • Windows
  • macOS
  • Linux

This means you can write a program on one operating system and usually run it on another.


5. Open Source

Python is completely free to use.

Anyone can:

  • Download Python
  • Study its source code
  • Improve it
  • Contribute to its development

Because Python is open source, thousands of developers around the world continuously improve it.


6. Rich Standard Library

Python includes a large standard library.

It provides ready-to-use modules for tasks such as:

  • Working with files
  • Mathematics
  • Dates and times
  • Internet communication
  • Data processing

This saves developers a significant amount of time.


7. Huge Community

Python has one of the largest programming communities in the world.

Whenever you face a problem, you can easily find:

  • Documentation
  • Tutorials
  • Videos
  • Books
  • Community discussions

This makes learning Python much easier.


Part Summary

  • Python has a simple and readable syntax.
  • It is an interpreted language.
  • Python works on multiple operating systems.
  • It is free and open source.
  • It includes a rich standard library.
  • It has one of the largest programming communities in the world.

Part 5 — What Can You Build with Python?

One of the biggest reasons behind Python's popularity is its versatility.

Python is not limited to a single field.

Instead, it is used in many different industries and for countless types of projects.

Let's explore some of the most common applications of Python.


1. Web Development

Python is widely used for building websites and web applications.

Popular frameworks such as Django and Flask allow developers to create everything from personal blogs to large business platforms.

Examples include:

  • E-commerce websites
  • Online learning platforms
  • Company websites
  • APIs

2. Data Analysis

Organizations collect enormous amounts of data every day.

Python helps analysts clean, process, visualize, and understand that data.

Popular libraries include:

  • NumPy
  • Pandas
  • Matplotlib

Python has become one of the most important tools in data science.


3. Artificial Intelligence and Machine Learning

Python is currently the leading language for Artificial Intelligence (AI) and Machine Learning (ML).

Many modern AI applications are built using Python.

Examples include:

  • Image recognition
  • Speech recognition
  • Recommendation systems
  • Chatbots

4. Automation

Many repetitive computer tasks can be automated using Python.

Instead of doing the same work every day, you can write a program that performs it automatically.

Examples include:

  • Renaming files
  • Sending emails
  • Processing spreadsheets
  • Organizing folders

5. Game Development

Although Python is not the primary language for AAA games, it is an excellent language for learning game development.

Libraries such as Pygame make creating 2D games simple and enjoyable.


6. Cybersecurity

Python is frequently used by cybersecurity professionals.

It can be used for:

  • Network analysis
  • Security testing
  • Log analysis
  • Automation tools

7. Scientific Computing

Researchers and scientists use Python for simulations, mathematical calculations, and scientific experiments.

Many universities teach Python because of its powerful scientific ecosystem.


Part Summary

  • Python is used in many different fields.
  • It powers websites, AI systems, automation tools, and scientific research.
  • Learning Python opens doors to countless career opportunities.
  • The same language can be applied to many different industries.