Python Programming Overview
Key Concepts and Features
What is Software?
• - Collection of program instructions
• - Performs tasks on computers/devices
• Categories:
• 1. System Software
• 2. Application Software
• 3. Programming Software
• 4. Customized Software
Python Overview
• - High-level, general-purpose programming
language
• - Created by Guido van Rossum (1989)
• - Official release: February 20, 1991
• - Beginner-friendly with simple syntax
Python Program Structure
• 1. Include Statements:
• - Start with #
• - Preprocessor directives
• 2. Main Function:
• - Entry point of the program
• - User-defined and mandatory
• 3. Processing Statements:
Features of Python
• - Freeware and Open Source
• - Platform-independent
• - Portable
• - Extensible and Embedded
• - Extensive library support
Python Flavors
• 1. CPython: Standard Python for C integration
• 2. Jython: For Java applications (runs on JVM)
• 3. IronPython: For .NET applications
• 4. PyPy: Faster execution (JIT compilation)
• 5. RubyPython: For Ruby integration
• 6. Anaconda Python: Optimized for data
processing
Python Identifiers and Reserved
Words
• - Identifiers:
• - Must start with a letter or underscore
• - Case-sensitive
• - No special characters (e.g., $)
• - Reserved Words:
• - Examples: if, else, while, for, def, class, etc.
Numerical Systems in Python
• 1. Decimal (Base 10): Default system (e.g., a =
10)
• 2. Binary (Base 2): Prefix with 0b (e.g., a =
0b1010)
• 3. Octal (Base 8): Prefix with 0o (e.g., a = 0o12)
• 4. Hexadecimal (Base 16): Prefix with 0x (e.g.,
a = 0xA)