Faysal Ahmed

Fundamentals of Python

A hands-on guide to learning Python from scratch. Covers variables, control flow, functions, data structures, OOP, file I/O, modules, error handling, and popular libraries — with interactive quizzes at every stage.

Table of Contents

  1. Chapter 1

    Getting Started with Python

    Installing Python, running your first script, using the interactive shell, and understanding Python's design philosophy.

  2. Chapter 3

    Control Flow

    Conditional statements (if/elif/else), for loops, while loops, range(), break, continue, and the match statement.

  3. Chapter 4

    Functions

    Defining functions, parameters and arguments, return values, scope, lambda functions, and docstrings.

  4. Chapter 5

    Data Structures

    Lists, tuples, sets, dictionaries, list comprehensions, and when to use each data structure.

  5. Chapter 6

    Strings & File I/O

    String methods, f-strings, string formatting, reading and writing files, the with statement, and working with CSV data.

  6. Chapter 7

    Object-Oriented Programming

    Classes and objects, instance attributes, methods, inheritance, dunder methods, and properties.

  7. Chapter 8

    Modules & Packages

    The import system, standard library highlights, creating your own modules, pip, and virtual environments.

  8. Chapter 9

    Error Handling

    Exceptions, try/except/else/finally, raising exceptions, creating custom exceptions, and debugging techniques.

  9. Quizzes

    Test Your Knowledge

    Chapter quizzes (3 questions each), a mid-book quiz (5 questions), and a final quiz (20 questions).