Introduction
📋 Prerequisites
- • None
🎯 What We Will Learn / आपण काय शिकणार आहोत
- • We will get into basics of python
Introduction to Python
Python is a high-level, interpreted, and general-purpose programming language.
It is designed to be easy to read, easy to write, and easy to understand, making it one of the most popular languages in the world today.
Python focuses on simplicity and clarity, which allows developers to concentrate more on problem-solving rather than complex syntax.
What is Python?
Python is a programming language used to:
- Build software applications
- Develop websites
- Analyze data
- Automate tasks
- Work with artificial intelligence and machine learning
Python code is written in plain English–like syntax, which makes it beginner-friendly and highly readable.
Definition
Python is a high-level programming language that supports multiple programming paradigms and is widely used for general-purpose programming.
Why Python Was Created
Before Python, many programming languages were:
- Difficult to read
- Complex to write
- Time-consuming to learn
Python was created to:
- Reduce code complexity
- Improve developer productivity
- Make programming accessible to everyone
The main idea behind Python is:
“Code should be readable and simple.”
Key Idea
Python prioritizes human readability over machine-level complexity.
Features of Python
Python has several important features that make it popular.
1. Simple and Easy to Learn
- Uses minimal syntax
- No complex brackets or symbols
- Easy for beginners to understand
2. High-Level Language
- No need to manage memory manually
- Developers focus on logic, not hardware details
3. Interpreted Language
- Code is executed line by line
- No separate compilation step required
4. Dynamically Typed
- No need to declare variable types explicitly
- Type is decided at runtime
5. Platform Independent
- Python code runs on Windows, Linux, and macOS
- Same code works across different systems
Important
Python programs are written once and can run on multiple platforms without modification.
How Python Works (Execution Model)
Python follows an interpreter-based execution model.
Steps involved:
- Python source code is written by the programmer
- The Python interpreter reads the code line by line
- Code is converted into bytecode internally
- Bytecode is executed by the Python Virtual Machine (PVM)
This process allows Python to:
- Detect errors easily
- Execute code quickly during development
Python Programming Paradigms
Python supports multiple programming styles.
1. Procedural Programming
- Code is written step by step
- Uses functions and logic flow
2. Object-Oriented Programming
- Uses classes and objects
- Supports concepts like inheritance and encapsulation
3. Functional Programming
- Supports functions as first-class objects
- Allows lambda expressions and map/filter functions
Learning Insight
Python’s flexibility allows developers to choose the best programming style for a problem.
Where Python Is Used
Python is used in many real-world domains.
- Web Development
- Data Science and Analytics
- Artificial Intelligence and Machine Learning
- Automation and Scripting
- Game Development
- Cybersecurity
- Cloud Computing
Real World Usage
Companies like Google, Netflix, Instagram, and Spotify use Python in their systems.
Advantages of Python
- Easy to learn and use
- Large standard library
- Huge community support
- Faster development time
- Highly readable code
Key Benefit
Python allows developers to build applications faster with fewer lines of code.
Limitations of Python
- Slower compared to compiled languages
- Not ideal for low-level system programming
- Higher memory usage in some cases
Note
Despite limitations, Python is preferred for rapid development and learning.
Why Learn Python as a Beginner?
Python is often recommended as the first programming language because:
- Syntax is simple
- Concepts are easy to grasp
- Used widely in industry
- Strong career opportunities
Beginner Insight
Learning Python builds a strong foundation for understanding other programming languages.
Summary
- Python is a high-level, interpreted language
- Designed for simplicity and readability
- Supports multiple programming paradigms
- Used across many industries
- Ideal for beginners and professionals alike
Exercise
- Write down what a programming language is
- List three features of Python
- Explain why Python is called a high-level language
📝 Lesson Summary
We learnt basics of python