INT108 Python Programming Topics
1. Introduction to Python
• History and features of Python
• Installing Python and IDEs (PyCharm, VS Code, Thonny)
• Running Python programs (interactive mode vs script mode)
• Understanding Python syntax and indentation
2. Basic Concepts
• Keywords and identifiers
• Variables and constants
• Data types: int, float, str, bool
• Type conversion (casting)
• Basic input/output: input(), print()
3. Operators
• Arithmetic operators: +, -, *, /, //, %, **
• Comparison operators: ==, !=, >, <, >=, <=
• Logical operators: and, or, not
• Assignment operators: =, +=, -=, etc.
• Bitwise operators: &, |, ^, ~, <<, >>
4. Control Structures
• Conditional statements: if, elif, else
• Loops: while, for
• break, continue, pass statements
• Nested loops and conditional statements
5. Data Structures
• Lists: creation, indexing, slicing, methods (append, insert, remove, sort, etc.)
• Tuples: creation, indexing, immutability
• Sets: creation, operations (union, intersection, difference)
• Dictionaries: key-value pairs, accessing, adding, updating, deleting items
6. Functions
• Defining and calling functions
• Function parameters (positional, keyword, default, variable-length)
1
• Return statement
• Scope of variables (local vs global)
• Lambda functions (anonymous functions)
7. Strings
• String creation and indexing
• String slicing
• String methods: upper(), lower(), strip(), replace(), split(), join()
• String formatting: f-strings, .format(), % operator
8. Modules and Packages
• Importing modules: import, from ... import ...
• Using standard libraries (math, random, datetime, os, sys)
• Creating user-defined modules
9. File Handling
• Opening and closing files: open(), close()
• File modes: 'r', 'w', 'a', 'rb', 'wb'
• Reading files: read(), readline(), readlines()
• Writing files: write(), writelines()
• Using with statement for file handling
10. Exception Handling
• Errors vs exceptions
• try, except, else, finally blocks
• Raising exceptions with raise
11. Object-Oriented Programming (OOP) Basics
• Classes and objects
• Attributes and methods
• Constructors (init)
• self keyword
• Inheritance and polymorphism (basic concepts)
• Encapsulation and abstraction (overview)
12. Advanced Topics (Optional)
• List comprehensions
• Dictionary and set comprehensions
2
• Generators and iterators
• Decorators (basic idea)
• Introduction to libraries like numpy or pandas