Skip to content

Computer Science Chapter Notes

Class 12 Computer Science · 13 of 13 chapters with notes

  1. Chapter 1 · Exception Handling in Python

    • Syntax errors are detected before execution; exceptions occur at runtime.
    • try/except/else/finally blocks handle exceptions gracefully.
    • Custom exceptions can be raised using raise.

    Open chapter and available exercises

  2. Chapter 2 · File Handling in Python

    • Text files store readable characters; binary files store data in internal program format.
    • File modes: "r" read, "w" write (overwrite), "a" append, "rb"/"wb" for binary.
    • The pickle module serialises/deserialises Python objects to/from binary files.

    Open chapter and available exercises

  3. Chapter 3 · Stack

    • Stack follows LIFO (Last In, First Out); operations: push (insert), pop (remove from top).
    • Used for infix-to-postfix conversion and evaluating postfix expressions.

    Open chapter and available exercises

  4. Chapter 4 · Queue

    • Queue follows FIFO (First In, First Out); operations: enqueue (insert at rear), dequeue (remove from front).
    • A deque allows insertion/deletion from both ends.

    Open chapter and available exercises

  5. Chapter 5 · Sorting

    • Bubble sort: repeatedly swaps adjacent out-of-order elements; $O(n^2)$.
    • Selection sort: repeatedly selects the minimum and places it correctly; $O(n^2)$.
    • Insertion sort: builds the sorted list one element at a time; best case $O(n)$ for nearly-sorted data.

    Open chapter and available exercises

  6. Chapter 6 · Searching

    • Linear search: checks each element sequentially; $O(n)$.
    • Binary search: repeatedly halves the search range on sorted data; $O(\log n)$.
    • Hashing: uses a hash function to map keys directly to array positions for near-instant lookup.

    Open chapter and available exercises

  7. Chapter 7 · Understanding Data

    • Data can be qualitative (categorical) or quantitative (numeric).
    • Data sources: primary (firsthand) or secondary (reused, published).
    • Data processing converts raw data into meaningful information via statistical techniques.

    Open chapter and available exercises

  8. Chapter 8 · Database Concepts

    • DBMS manages data efficiently, ensuring integrity and reducing redundancy compared to a file system.
    • Relational model organises data into tables (relations) with rows (tuples) and columns (attributes).
    • Keys: candidate key, primary key, foreign key — used to identify records and establish relationships.

    Open chapter and available exercises

  9. Chapter 9 · Structured Query Language (SQL)

    • DDL commands (CREATE, ALTER, DROP) define database structure.
    • DML commands (INSERT, UPDATE, DELETE) manipulate data.
    • SELECT with WHERE, GROUP BY, and aggregate functions (SUM, COUNT, AVG) query and summarise data.

    Open chapter and available exercises

  10. Chapter 10 · Computer Networks

    • Network types by scale: LAN, MAN, WAN.
    • Topologies: star, bus, ring, mesh — describe the physical/logical arrangement of network devices.
    • The Internet is a global network of networks; the Web (WWW) is a system of interlinked documents accessed via the Internet.

    Open chapter and available exercises

  11. Chapter 11 · Data Communication

    • Modes: simplex (one-way), half-duplex (both ways, one at a time), full-duplex (both ways simultaneously).
    • Transmission media: wired (twisted pair, coaxial, fibre optic) and wireless (radio, microwave, satellite).
    • Protocols (like TCP/IP) define rules for reliable data exchange between devices.

    Open chapter and available exercises

  12. Chapter 12 · Security Aspects

    • Malware types: virus, worm, trojan horse, spyware.
    • HTTPS encrypts data in transit (unlike plain HTTP), protecting sensitive information.
    • Firewalls monitor and control incoming/outgoing network traffic based on security rules.

    Open chapter and available exercises

  13. Chapter 13 · Project Based Learning

    • Project workflow: define requirements → design database/logic → implement → test → document.
    • Teamwork divides responsibilities and enables peer review, mirroring real-world software development practices.

    Open chapter and available exercises