Lesson 1 of 70 – Introduction to Python
1.4%

Introduction to Python

Python is a popular, high-level programming language known for its simple syntax and readability. It is widely used for web development, software development, data analysis, artificial intelligence, machine learning, automation, and many other areas.

Note: Python is designed to be easy to read and write, making it an excellent programming language for beginners.
What is Python?

Python is a high-level, general-purpose programming language. It allows developers to write programs using simple and readable syntax.

Python programs are generally shorter and easier to understand compared with programs written in many other programming languages.

  • Python is a high-level programming language.
  • Python is an interpreted programming language.
  • Python supports object-oriented programming.
  • Python supports procedural and functional programming.
  • Python is open-source and freely available.
  • Python can be used on different operating systems.
History of Python

Python was created by Guido van Rossum. The development of Python started in the late 1980s, and the first public release of Python was made in 1991.

Feature Information
Creator Guido van Rossum
First Released 1991
Successor to ABC Programming Language
Latest Major Version Python 3
Type High-level programming language
License Open Source
Features of Python
  • Easy to learn and understand.
  • Simple and readable syntax.
  • Free and open-source.
  • Platform independent.
  • Supports object-oriented programming.
  • Supports multiple programming paradigms.
  • Large standard library.
  • Large developer community.
  • Supports third-party libraries and packages.
  • Widely used in modern technology.
Why Learn Python?

Python is one of the most widely used programming languages. Its simple syntax makes it suitable for beginners, while its large ecosystem makes it useful for professional developers.

  • Easy for beginners to learn.
  • Useful for many different types of applications.
  • Large number of libraries and frameworks.
  • Used in web development.
  • Used in data analysis.
  • Used in artificial intelligence and machine learning.
  • Used for automation and scripting.
  • Useful for software and application development.
Applications of Python

Python is used in many areas of software development and technology.

  • Web Development
  • Software Development
  • Data Analysis
  • Artificial Intelligence
  • Machine Learning
  • Automation
  • Scientific Computing
  • Game Development
  • Cybersecurity
  • Web Scraping
  • Database Programming
Python and Operating Systems

Python is a cross-platform programming language. This means that Python programs can run on different operating systems with little or no modification.

Operating System Python Support
Windows Yes
Linux Yes
macOS Yes
First Python Program

Let's write our first Python program. The print() function is used to display information on the screen.

Example:
print("Hello World!")
Output:
Hello World!

The print() function displays the text written inside the parentheses.

Python Syntax

Python has a simple and readable syntax. Unlike many programming languages, Python uses indentation to define blocks of code.

Example:
if 10 > 5:
    print("10 is greater than 5")
Output:
10 is greater than 5

The spaces before print() are important because they define the code block.

Python Interpreter

A Python interpreter is a program that reads and executes Python code.

When you run a Python program, the interpreter processes the Python code and executes the instructions.

Python also provides an interactive environment where you can execute Python commands one at a time.

Example:
>>> 10 + 20
30
Python Program File

Python source code is normally saved with the .py file extension.

Example:
hello.py

A Python file can contain variables, functions, conditions, loops, classes, and other Python statements.

Advantages of Python
  • Simple and easy-to-read syntax.
  • Easy for beginners.
  • Free and open-source.
  • Cross-platform.
  • Large standard library.
  • Thousands of third-party packages are available.
  • Supports object-oriented programming.
  • Used in many technology fields.
  • Large community support.
  • Suitable for rapid application development.
Python vs Other Programming Languages
Feature Python C Java
Syntax Simple More complex More verbose
Learning Beginner friendly Moderate Moderate
Programming Style Multiple paradigms Procedural Object-oriented
Common Uses Web, AI, Data, Automation System Programming Enterprise Applications
Key Points
  • Python is a high-level programming language.
  • Python was created by Guido van Rossum.
  • Python was first released in 1991.
  • Python is free and open-source.
  • Python has simple and readable syntax.
  • Python uses indentation to define code blocks.
  • Python programs normally use the .py extension.
  • Python can run on Windows, Linux, and macOS.
  • Python is widely used in web development, data science, AI, automation, and software development.
  • The print() function is commonly used to display output.

🧠 Quick Quiz

Who created Python?