Week 1: Introduction to Python
- Overview of Python: History, features, and applications.
- Setting Up Python: Installation of Python and IDEs (Anaconda, Jupyter Notebook, VSCode).
- First Steps: Writing and running your first Python script.
- Basic Syntax: Comments, indentation, and basic input/output functions (
print
,input
).
Week 2: Data Types and Variables
- Variables: Naming conventions, assigning values.
- Data Types: Integers, floats, strings, and booleans.
- Type Conversion: Implicit and explicit conversion.
- String Operations: Concatenation, slicing, formatting.
Week 3: Operators and Expressions
- Arithmetic Operators: Addition, subtraction, multiplication, division, modulus.
- Comparison Operators: Equal to, not equal to, greater than, less than, etc.
- Logical Operators: And, or, not.
- Assignment Operators:
=
,+=
,-=
, etc. - Expressions: Combining operators and variables.
Week 4: Control Flow
- Conditional Statements:
if
,elif
,else
. - Loops:
for
loops,while
loops. - Control Flow Tools:
break
,continue
,pass
.
Week 5: Functions
- Defining Functions:
def
keyword, parameters, and return values. - Scope: Local vs global variables.
- Lambda Functions: Anonymous functions.
- Built-in Functions:
len
,range
,type
, etc.
Week 6: Data Structures
- Lists: Creating, accessing, modifying, slicing, and methods.
- Tuples: Creating, accessing, immutability.
- Dictionaries: Creating, accessing, adding, removing items.
- Sets: Creating, adding, removing items, set operations.
Week 7: Modules and Packages
- Importing Modules:
import
statement,from ... import ...
. - Standard Library: Overview of useful modules (e.g.,
math
,datetime
,os
). - Creating Modules: Writing and using your own modules.
Week 8: File Handling
- Reading Files:
open
,read
,readline
,readlines
. - Writing Files:
write
,writelines
. - File Methods:
close
,with
statement for file handling.
Week 9: Error Handling
- Exceptions: Understanding exceptions,
try
,except
blocks. - Handling Multiple Exceptions: Using multiple
except
blocks. - Finally Block: Code that must run no matter what.
- Raising Exceptions: Using
raise
to trigger exceptions.
Week 10: Object-Oriented Programming (OOP)
- Classes and Objects: Defining classes, creating objects.
- Attributes and Methods: Instance variables and methods.
- Inheritance: Creating subclasses, overriding methods.
- Polymorphism and Encapsulation: Basic concepts and examples.