Python LEC 3,4,5
Python LEC 3,4,5
Definition:
Python is a high-level, interpreted, general-purpose programming language known for its
easy syntax and readability. It was created by Guido van Rossum and officially released in
1991.
1. High-Level Language
o Easy to understand and closer to human language.
o Handles memory management internally.
2. Interpreted
o Code runs line-by-line without compilation.
o Makes debugging easier and faster.
3. Dynamically Typed
o No need to declare variable types explicitly.
o Type is determined at runtime.
4. Object-Oriented & Procedural
o Supports OOP principles like inheritance, classes, and encapsulation.
o Can also be used procedurally (with functions).
5. Portable and Cross-platform
o Python code can run on Windows, Mac, and Linux without changes.
6. Extensive Standard Library
o Comes with built-in modules for file handling, math, web, databases, etc.
7. Easy to Learn and Use
o Great for beginners and used in many academic and professional settings.
Example Code:
Python
CopyEdit
Print ("Hello, World!")
2 HISTORY OF PYTHON
2.1 CREATOR:
2.2 INSPIRATION:
Named after the British comedy show “Monty Python’s Flying Circus,” not the snake.
Automate repetitive tasks like renaming files, sending emails, scraping websites.
Tools: Selenium, PyAutoGUI, Requests
Library: Pygame
Python can be used for developing small 2D games.
Great for learning game logic and prototyping.
3.5 DESKTOP GUI APPLICATIONS
Used in Raspberry Pi for home automation, robotics, and sensor data collection.
Used for building network scanners, password crackers, and automation tools.
Libraries: Scapy, Nmap, Requests
CONCLUSION
Python is a modern, powerful, and flexible programming language. Whether you're a beginner
learning to code or a professional working on data science or AI, Python is a perfect language to
master due to its simplicity and vast ecosystem.