Module 1.1

Introduction to Python

Discover why Python is one of the most popular programming languages in the world. Learn its history, key features, real-world applications, and why beginners love it!

20 min read
Beginner
What You'll Learn
  • What Python is and its history
  • Why Python is so popular
  • Real-world Python applications
  • Python vs other languages
  • Write your first Python code
Contents
01

What is Python?

Python

A high-level, interpreted, general-purpose programming language known for its readable syntax and versatility.

Created by Guido van Rossum and first released in 1991, Python emphasizes code readability with its notable use of significant indentation.

Python is one of the most beginner-friendly programming languages, yet powerful enough for professional developers at companies like Google, Netflix, and NASA. Its clean syntax reads almost like English, making it the perfect first language to learn.

Fun Fact: Python is not named after the snake! Guido van Rossum named it after the British comedy group "Monty Python's Flying Circus" because he wanted a short, unique, and slightly mysterious name.

Key Characteristics of Python

Readable & Clean

  • Uses indentation for blocks
  • No curly braces needed
  • Minimal punctuation
  • Reads like English

Interpreted Language

  • No compilation step
  • Run code line by line
  • Quick to test ideas
  • Interactive mode (REPL)

Dynamically Typed

  • No type declarations
  • Variables are flexible
  • Types checked at runtime
  • Less boilerplate code

Python Code Example

Here is a simple comparison showing how clean Python code looks:

# Python - Simple and clean
name = "Alice"
age = 25
print(f"Hello, {name}! You are {age} years old.")  # Hello, Alice! You are 25 years old.

Compare this to Java, which requires more code for the same task:

// Java - More verbose
public class Main {
    public static void main(String[] args) {
        String name = "Alice";
        int age = 25;
        System.out.println("Hello, " + name + "! You are " + age + " years old.");
    }
}
Key Insight: Python achieves the same result with just 3 lines of code compared to Java's 7 lines. This simplicity is why Python is perfect for beginners!
02

Why Learn Python?

Python consistently ranks as one of the top programming languages worldwide. Whether you want to build websites, analyze data, create AI, or automate tasks, Python has you covered. Here are the top reasons to learn Python:

Easy to Learn

Python's syntax is designed to be intuitive and mirrors natural language. Most beginners can write their first program within minutes of starting!

High Demand Jobs

Python developers are among the highest-paid in the industry. Companies like Google, Netflix, Instagram, and Spotify all use Python.

Vast Library Ecosystem

Over 400,000+ packages on PyPI (Python Package Index). From web development to machine learning, there is a library for almost everything!

Huge Community

Millions of developers worldwide. Stack Overflow, Reddit, and countless tutorials mean help is always available when you get stuck.

Python Popularity Rankings

Python consistently ranks in the top 3 programming languages across major indices:

Index Python Rank Year
TIOBE Index #1 2025
Stack Overflow Survey #1 Most Wanted 2024
GitHub Octoverse #2 2024
IEEE Spectrum #1 2024
03

Real-World Applications

Python powers some of the world's most popular applications and services. From automating simple tasks to building complex AI systems, Python is everywhere!

1

Web Development

Build powerful websites and web applications with frameworks like Django and Flask.

Django Flask FastAPI
2

Data Science

Analyze data, create visualizations, and uncover insights from complex datasets.

Pandas NumPy Matplotlib
3

Machine Learning & AI

Build intelligent systems that can learn, predict, and make decisions.

TensorFlow PyTorch Scikit-learn
4

Automation & Scripting

Automate repetitive tasks, file operations, and system administration.

Selenium PyAutoGUI Fabric
5

Game Development

Create 2D games and game prototypes with beginner-friendly libraries.

Pygame Arcade Panda3D
6

Cybersecurity

Build security tools, penetration testing scripts, and network analysis tools.

Scapy Nmap Cryptography

Companies Using Python

Some of the world's biggest companies rely on Python for their core products:

Google
Search, AI, Cloud
Instagram
Backend
Spotify
Data Analysis
Netflix
ML & Recommendations
04

Python vs Other Languages

Every programming language has its strengths. Here is how Python compares to other popular languages you might have heard about:

Aspect
Python
JavaScript
Java
Learning Curve
Easy
Moderate
Steep
Syntax
Clean, readable, minimal
Flexible, but quirky
Verbose, strict
Best For
Data Science, AI, Automation, Backend
Web Frontend, Full-Stack, Mobile
Enterprise, Android, Large Systems
Speed
Moderate
Fast (V8)
Fast (JVM)
Job Market
Excellent
Excellent
Excellent
Which Should You Choose? If you are a complete beginner, Python is the best starting point. Its simple syntax lets you focus on programming concepts rather than fighting with complex language rules.
05

Your First Python Program

Let us write your very first Python program! The traditional "Hello, World!" program is the simplest way to start. In Python, it takes just one line of code:

# Your first Python program!
print("Hello, World!")  # Hello, World!
What is print()? It is a built-in function that displays text on the screen. Whatever you put inside the parentheses gets printed.

Going Further: Variables and Input

Let us make it interactive by asking for the user's name:

# Ask for user's name and greet them
name = input("What is your name? ")  # User types: Alice
print(f"Hello, {name}! Welcome to Python!")  # Hello, Alice! Welcome to Python!

Basic Math Operations

Python can also work as a calculator:

# Basic arithmetic
x = 10
y = 3

print(x + y)   # 13 (addition)
print(x - y)   # 7 (subtraction)
print(x * y)   # 30 (multiplication)
print(x / y)   # 3.333... (division)
print(x // y)  # 3 (floor division)
print(x % y)   # 1 (remainder)
print(x ** y)  # 1000 (power: 10^3)

Try It Yourself!

Here is a small program that calculates your birth year:

# Calculate birth year
current_year = 2026
age = int(input("How old are you? "))  # User types: 25
birth_year = current_year - age
print(f"You were born in {birth_year}!")  # You were born in 2001!
Congratulations! You have just seen your first Python programs. In the next lesson, we will set up Python on your computer so you can start coding!

Key Takeaways

Beginner-Friendly

Python's clean syntax and readable code make it the perfect first programming language

Top Ranked Language

Python consistently ranks #1 in major programming language indices worldwide

Massive Ecosystem

400,000+ packages available for web, data science, AI, automation, and more

Used by Top Companies

Google, Netflix, Instagram, Spotify, and NASA all use Python in production

High-Paying Careers

Python developers are among the highest-paid in the software industry

Versatile Applications

From web development to AI to game development, Python does it all

Knowledge Check

Test your understanding of Python fundamentals:

Question 1 of 6

Who created Python and when was it first released?

Question 2 of 6

What does it mean that Python is an "interpreted" language?

Question 3 of 6

Why is Python named "Python"?

Question 4 of 6

Which of these is NOT a common use case for Python?

Question 5 of 6

What does the print() function do in Python?

Question 6 of 6

What is the result of 10 // 3 in Python?

Answer all questions to check your score