← Back to Hub

Computer Science Chapters

Chapter summaries, key syntax, important algorithms, exam tips and exercise overviews for all 13 chapters — 129 NCERT questions covered.

Chapter 1
Exception Handling in Python
Syntax Errors · Exceptions · Built-in Exceptions · Raising Exceptions · Handling Exceptions · Finally Clause
8marks

🎯 Must-Read — Key concepts for this chapter

  1. A program can have two types of errors — syntax errors and exceptions (runtime errors)
  2. Syntax errors are detected by the interpreter before the program runs
  3. Exceptions occur during the execution of a program
  4. Python provides a robust exception handling mechanism using try-except blocks
  5. Exception handling allows programs to handle errors gracefully without crashing

📖 Chapter Summary

ConceptKey Fact
ErrorAn error is a mistake or bug in a program that causes it to behave unexpectedly or terminate abnormally. Errors can be broadly categorized as syntax errors and exceptions (logical/runtime errors).
ExceptionAn exception is an error that occurs during the execution of a program, disrupting the normal flow of instructions. Unlike syntax errors, exceptions happen at run-time.
Syntax ErrorA syntax error occurs when the Python parser encounters a statement that does not conform to the rules (syntax) of the Python language. The program will not execute until all syntax errors are corrected.
TracebackA traceback is a report that Python generates when an exception occurs. It shows the sequence of function calls that led to the error, along with the file name, line number, and the type of exception.
SyntaxErrorRaised when the Python parser encounters a syntax error in the code. Example: print('Hello' — missing closing parenthesis.
ValueErrorRaised when a built-in operation or function receives an argument that has the right type but an inappropriate value. Example: int('abc') raises ValueError.
IOErrorRaised when an I/O operation (such as open(), read(), write()) fails for an I/O related reason. Example: trying to open a file that does not exist.
KeyboardInterruptRaised when the user presses the interrupt key (usually Ctrl+C or Delete). This can be used to gracefully exit an infinite loop or long-running process.
ImportErrorRaised when an import statement fails to find the specified module, or when a from...import fails to find the specified name in the module.
EOFErrorRaised when the input() function hits an end-of-file condition (EOF) without reading any data.
ZeroDivisionErrorRaised when the second operand of a division or modulo operation is zero. Example: 5/0 or 10%0.
IndexErrorRaised when a sequence (list, tuple, string) index is out of range. Example: accessing list[5] when the list has only 3 elements.
NameErrorRaised when a local or global name (variable, function, etc.) is not found. Example: using a variable that has not been defined.
IndentationErrorRaised when there is incorrect indentation. It is a subclass of SyntaxError. Example: inconsistent use of tabs and spaces in indentation.
TypeErrorRaised when an operation or function is applied to an object of inappropriate type. Example: '2' + 2 raises TypeError because a string and integer cannot be added.
💻 Key Syntax & Commands
  • raise syntax raise ExceptionType('error message') ExceptionType can be any built-in or user-defined exception class
  • assert syntax assert condition, 'error message' If condition is False, AssertionError is raised with the optional message
  • try-except basic syntax try: # statements that may raise exception except ExceptionType: # handler code The except block executes only if the specified exception occurs in the try block
  • Multiple except clauses try: # statements except ValueError: # handle ValueError except ZeroDivisionError: # handle ZeroDivisionError Each except clause handles a different type of exception
  • try-except-else syntax try: # statements except ExceptionType: # handle exception else: # runs only if no exception occurred The else block is optional and runs when try succeeds without any exception
  • try-except-finally syntax try: # statements except ExceptionType: # handle exception finally: # always executes (cleanup code) The finally block is guaranteed to execute in all circumstances
  • Complete try block syntax try: # risky code except ExceptionType: # handle error else: # no exception occurred finally: # cleanup — always runs This is the most complete form of exception handling in Python

💡 Quick Tips & Memory Aids

  • Syntax errors are also called parsing errors
  • Python displays the file name, line number, and a caret (^) pointing to the earliest point where the error was detected
  • Common causes: missing colon after if/else/while/for/def/class, unmatched parentheses or quotes, incorrect indentation, misspelled keywords
  • Syntax errors prevent the program from running at all
  • Even if a statement is syntactically correct, it may cause an error during execution — such errors are called exceptions
  • When an exception occurs and is not handled, the program terminates and Python displays a traceback
  • The traceback includes the type of exception and a descriptive message

📝 Exercise Overview

  • 9 total questions across 1 exercise
  • 5 long-answer / programming questions
  • 4 short-answer questions
Chapter 2
File Handling in Python
Types of Files · Opening and Closing a Text File · Writing to a Text File · Reading from a Text File · Setting Offsets in a File · Creating and Traversing a Text File · The Pickle Module
16marks

🎯 Must-Read — Key concepts for this chapter

  1. Data stored in variables (RAM) is temporary and lost when the program terminates
  2. Files provide a way to store data permanently on secondary storage
  3. Python treats files as a sequence of lines (text files) or bytes (binary files)
  4. A file object (file handle) is used to interact with the file on disk
  5. Text files store data as characters and are human-readable

📖 Chapter Summary

ConceptKey Fact
FileA file is a named location on a secondary storage medium (disk) used to store data permanently. It is a sequence of bytes stored on the disk.
File HandleA file handle (or file object) is a reference to a file on disk. It is created by the open() function and is used to perform read, write, and other operations on the file.
Text FileA text file stores data in the form of characters (strings). Each line is terminated by a special character called EOL (End of Line), which is the newline character ('\n') in Python. Text files are human-readable.
Binary FileA binary file stores data in the same format as it is stored in memory (as bytes). Binary files are not human-readable and are used for storing images, audio, video, and serialized objects.
EOL (End of Line)EOL is a special character that marks the end of a line in a text file. In Python, the default EOL character is '\n' (newline). On Windows, it is '\r\n'.
open() FunctionThe open() function is used to open a file and returns a file object. Syntax: file_object = open(filename, mode). The filename is a string representing the path to the file, and mode specifies how the file should be opened.
File Mode 'r'Opens the file for reading only. The file pointer is placed at the beginning. This is the default mode. Raises FileNotFoundError if the file does not exist.
File Mode 'w'Opens the file for writing only. If the file exists, its contents are overwritten (truncated). If the file does not exist, a new file is created.
File Mode 'a'Opens the file for appending. Data is written at the end of the file. The file pointer is placed at the end. If the file does not exist, a new file is created.
File Mode 'r+'Opens the file for both reading and writing. The file pointer is placed at the beginning. Raises FileNotFoundError if the file does not exist.
File Mode 'w+'Opens the file for both writing and reading. If the file exists, its contents are overwritten. If the file does not exist, a new file is created.
File Mode 'a+'Opens the file for both appending and reading. The file pointer is placed at the end. If the file does not exist, a new file is created.
with StatementThe with statement is used to open a file and ensures that the file is automatically closed when the block inside the with statement is exited, even if an exception occurs. Syntax: with open('file.txt', 'r') as f:
write() MethodThe write() method writes a string to the file and returns the number of characters written. It does not add a newline character at the end. Syntax: file_object.write(string)
writelines() MethodThe writelines() method writes a list (or any iterable) of strings to the file. It does not add newline characters between the strings. Syntax: file_object.writelines(list_of_strings)
💻 Key Syntax & Commands
  • open() syntax file_object = open(filename, mode) Default mode is 'r'. Returns a file object (file handle).
  • close() syntax file_object.close() Flushes any unwritten data and closes the file. Good practice to always close files.
  • with statement syntax with open('filename', 'mode') as file_object: # file operations Automatically closes the file when the with block is exited
  • write() syntax file_object.write(string) Returns the number of characters written. Does not add newline automatically.
  • writelines() syntax file_object.writelines(list_of_strings) Writes each string from the list. No newline added between strings.
  • read() syntax content = file_object.read([size]) Without argument, reads the entire file. With size, reads at most that many characters.
  • readline() syntax line = file_object.readline() Reads one line including newline. Returns empty string '' at EOF.
  • readlines() syntax lines = file_object.readlines() Returns a list of all lines. Each line includes the trailing newline character.
  • tell() syntax position = file_object.tell() Returns an integer representing the current position of the file pointer in bytes
  • seek() syntax file_object.seek(offset, reference_point) reference_point: 0 = beginning (default), 1 = current, 2 = end. For text files, only 0 is allowed as reference_point.
  • pickle.dump() syntax import pickle pickle.dump(object, file_object) file_object must be opened in binary write mode ('wb' or 'ab')
  • pickle.load() syntax import pickle object = pickle.load(file_object) file_object must be opened in binary read mode ('rb'). Raises EOFError when no more objects to read.

💡 Quick Tips & Memory Aids

  • Binary files store data as bytes and are not human-readable
  • Each line in a text file ends with an EOL character (\n)
  • Binary files are used to store non-text data like images, audio, video, and pickled objects
  • Text files can be opened in any text editor; binary files require specific programs
  • The open() function returns a file object used for all file operations
  • Mode 'r' is default and raises an error if the file doesn't exist
  • Mode 'w' creates a new file or overwrites an existing file

📝 Exercise Overview

  • 10 total questions across 1 exercise
  • 6 long-answer / programming questions
  • 4 short-answer questions
Chapter 3
Stack
Stack · Operations on Stack · Implementation of Stack in Python · Notations for Arithmetic Expressions · Conversion from Infix to Postfix Notation · Evaluation of Postfix Expression
16marks

🎯 Must-Read — Key concepts for this chapter

  1. Data structures help in organizing data for efficient access and modification
  2. Linear data structures have elements in a sequential arrangement
  3. Stacks and queues are special types of linear data structures with restricted operations
  4. The choice of data structure depends on the nature of operations to be performed
  5. Stack follows LIFO — the last element inserted is the first to be removed

📖 Chapter Summary

ConceptKey Fact
Data StructureA data structure is a particular way of organizing and storing data in a computer so that it can be accessed and modified efficiently. It defines the relationship between the data and the operations that can be performed on it.
Linear Data StructureA linear data structure is one in which data elements are arranged in a sequential order, where each element has a predecessor and a successor (except the first and last elements). Examples: arrays, stacks, queues, linked lists.
StackA stack is a linear data structure that follows the LIFO (Last In First Out) principle. Elements can only be added (pushed) or removed (popped) from one end called the TOP of the stack.
LIFOLIFO stands for Last In First Out. It means the last element added to the stack is the first element to be removed. The most recently pushed element is always at the top and is the first to be popped.
TOPTOP is a pointer/variable that keeps track of the topmost element of the stack. It indicates the position where the next element will be added or from where the next element will be removed.
OverflowStack overflow occurs when an attempt is made to push an element onto a stack that is already full (has reached its maximum capacity).
UnderflowStack underflow occurs when an attempt is made to pop an element from an empty stack (no elements to remove).
PUSHPUSH is the operation of adding (inserting) a new element to the top of the stack. After a push operation, the new element becomes the topmost element and TOP is incremented.
POPPOP is the operation of removing (deleting) the topmost element from the stack. The element at TOP is removed and returned, and TOP is decremented. POP on an empty stack causes underflow.
Infix NotationIn infix notation, the operator is placed between the two operands. Example: A + B, (A + B) * C. This is the most commonly used notation by humans but requires parentheses to override operator precedence.
Prefix Notation (Polish Notation)In prefix notation, the operator is placed before its operands. Example: + A B, * + A B C. Named after Polish mathematician Jan Lukasiewicz. Does not require parentheses.
Postfix Notation (Reverse Polish Notation)In postfix notation, the operator is placed after its operands. Example: A B +, A B + C *. Also called Reverse Polish Notation (RPN). Does not require parentheses and is easy for computers to evaluate using a stack.
A stacka linear data structure that follows the LIFO (Last In First Out) principle.
Elements can only be inserted (PUSH) or removed (POP) from the TOP of the stack.
Stack overflow occurs when pushing to a full stack; underflow occurs when popping from an empty stack.
💻 Key Syntax & Commands
  • PUSH algorithm Step 1: If stack is full, print 'Overflow' and return Step 2: Increment TOP by 1 Step 3: Set stack[TOP] = element Step 4: Return In Python using list, we use append() which handles resizing automatically
  • POP algorithm Step 1: If stack is empty, print 'Underflow' and return Step 2: Set element = stack[TOP] Step 3: Decrement TOP by 1 Step 4: Return element In Python using list, we use pop() which removes and returns the last element
  • Stack implementation using list stack = [] # empty stack stack.append(element) # PUSH element = stack.pop() # POP top = stack[-1] # PEEK len(stack) # SIZE len(stack) == 0 # isEmpty Python lists grow dynamically, so no overflow check needed for list-based stacks
  • Operator precedence (highest to lowest) ** (exponentiation) > *, /, //, % > +, - ** is right-associative; all others are left-associative
  • Infix to Postfix conversion examples A + B -> A B + A + B * C -> A B C * + (A + B) * C -> A B + C * A + B * C - D -> A B C * + D - (A + B) * (C - D) -> A B + C D - * Follow operator precedence and associativity rules during conversion
  • Infix to Postfix Algorithm 1. Create an empty stack and output list 2. Scan the infix expression left to right: a. If operand, add to output b. If '(', push onto stack c. If ')', pop and add to output until '(' is found; discard '(' d. If operator, pop and add to output while stack top has >= precedence (for left-assoc) or > precedence (for right-assoc); then push current operator 3. Pop all remaining operators from stack to output Handle operator associativity: left-to-right for +, -, *, /; right-to-left for **
  • Postfix Evaluation Algorithm 1. Create an empty stack 2. Scan the postfix expression left to right: a. If operand, push onto stack b. If operator, pop two operands (op2 = pop, op1 = pop), compute op1 operator op2, push result 3. The final element in the stack is the result op1 is the second popped element, op2 is the first popped. Order: op1 operator op2.

💡 Quick Tips & Memory Aids

  • All insertions and deletions happen at the TOP of the stack
  • Stack has two main operations: PUSH (insert) and POP (delete)
  • Stack overflow occurs when pushing to a full stack
  • Stack underflow occurs when popping from an empty stack
  • Applications: expression evaluation, string reversal, undo operations, browser back button, parenthesis matching, function call management
  • PUSH adds an element to the top; POP removes the top element
  • Before PUSH, check for overflow (stack full)

📝 Exercise Overview

  • 7 total questions across 1 exercise
  • 4 long-answer / programming questions
  • 3 short-answer questions
Chapter 4
Queue
Operations on Queue · Implementation of Queue Using Python · Implementation of Deque Using Python
Supplementary

🎯 Must-Read — Key concepts for this chapter

  1. Queue follows FIFO — the first element inserted is the first to be removed
  2. Insertion happens at the rear end; deletion happens at the front end
  3. A queue has two pointers: front and rear
  4. Queue is different from a stack (LIFO) — stack uses one end, queue uses two ends
  5. Applications: job scheduling, print queue, BFS traversal, handling requests in web servers

📖 Chapter Summary

ConceptKey Fact
QueueA queue is a linear data structure that follows the FIFO (First In First Out) principle. Elements are inserted at the rear end and removed from the front end.
FIFOFIFO stands for First In First Out. It means the element that is inserted first is the first one to be removed. The oldest element in the queue is always at the front.
FrontFront is the end of the queue from which elements are removed (dequeued). It points to the first (oldest) element in the queue.
RearRear is the end of the queue at which new elements are added (enqueued). It points to the last (newest) element in the queue.
EnqueueEnqueue is the operation of adding (inserting) a new element at the rear end of the queue. After enqueue, the new element becomes the last element and the rear pointer is updated.
DequeueDequeue is the operation of removing (deleting) an element from the front end of the queue. The element at the front is removed and returned, and the front pointer is updated.
PeekPeek (or front) is the operation of viewing the front element of the queue without removing it. It returns the element that would be dequeued next.
Deque (Double-Ended Queue)A deque (pronounced 'deck') is a linear data structure that allows insertion and deletion of elements from both the front and the rear end. It is a generalization of both stack and queue.
Input-Restricted DequeAn input-restricted deque is a deque where insertion is allowed only at one end (rear), but deletion is allowed from both ends (front and rear).
Output-Restricted DequeAn output-restricted deque is a deque where deletion is allowed only at one end (front), but insertion is allowed at both ends (front and rear).
A queuea linear data structure that follows the FIFO (First In First Out) principle.
Elements are added at the rear end (enqueue) and removed from the front end (dequeue).
Queue overflow occurs when inserting into a full queue; underflow occurs when removing from an empty queue.
In Python, a queue can be implemented using a list: append() for enqueue and pop(0) for dequeue.
A deque (double-ended queue) allows insertion and deletion from both the front and rear ends.
💻 Key Syntax & Commands
  • Enqueue algorithm Step 1: If queue is full, print 'Overflow' and return Step 2: Increment rear by 1 Step 3: Set queue[rear] = element Step 4: If front is -1, set front = 0 Step 5: Return In Python using list, we use append() which adds to the end automatically
  • Dequeue algorithm Step 1: If queue is empty, print 'Underflow' and return Step 2: Set element = queue[front] Step 3: Increment front by 1 Step 4: If front > rear, reset front = rear = -1 (queue empty) Step 5: Return element In Python using list, we use pop(0) which removes the first element
  • Queue implementation using list queue = [] # empty queue queue.append(element) # Enqueue element = queue.pop(0) # Dequeue front = queue[0] # Peek len(queue) # Size len(queue) == 0 # isEmpty pop(0) is O(n) — for better performance, use collections.deque
  • Deque implementation using list deque = [] # empty deque deque.append(element) # Add at rear deque.insert(0, element) # Add at front element = deque.pop() # Remove from rear element = deque.pop(0) # Remove from front insert(0, elem) and pop(0) are O(n). For O(1), use collections.deque with appendleft() and popleft()

💡 Quick Tips & Memory Aids

  • Enqueue adds an element at the rear; dequeue removes an element from the front
  • Before enqueue, check for overflow (queue full)
  • Before dequeue, check for underflow (queue empty)
  • Peek returns the front element without removing it
  • In Python, append() is used for enqueue and pop(0) is used for dequeue
  • Python list can be used to implement a queue
  • append() adds to the rear of the queue — enqueue operation

📝 Exercise Overview

  • 7 total questions across 1 exercise
  • 3 long-answer / programming questions
  • 4 short-answer questions
Chapter 5
Sorting
Bubble Sort · Selection Sort · Insertion Sort · Time Complexity of Algorithms
Supplementary

🎯 Must-Read — Key concepts for this chapter

  1. Sorting arranges data in ascending or descending order
  2. Sorting is essential for efficient searching (e.g., binary search requires sorted data)
  3. Common sorting algorithms in CBSE syllabus: Bubble Sort, Selection Sort, Insertion Sort
  4. All three algorithms studied are comparison-based sorts
  5. Sorting can be done on numbers, strings, or any comparable data

📖 Chapter Summary

ConceptKey Fact
SortingSorting is the process of arranging data elements in a specific order, either ascending (increasing) or descending (decreasing), based on some key value.
In-place SortingA sorting algorithm is said to be in-place if it requires only a constant amount O(1) of extra memory space, apart from the input array.
Stable SortA sorting algorithm is stable if two elements with equal keys appear in the same order in the sorted output as they appear in the input.
Bubble SortBubble Sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order. The pass through the list is repeated until the list is sorted.
PassA pass is one complete traversal through the list during which adjacent elements are compared and swapped if necessary. In Bubble Sort, after each pass, the largest unsorted element moves to its correct position.
Selection SortSelection Sort is a sorting algorithm that repeatedly selects the smallest (or largest) element from the unsorted portion and places it at the beginning (or end) of the sorted portion. It divides the input list into a sorted and an unsorted region.
Insertion SortInsertion Sort is a sorting algorithm that builds a sorted array one element at a time by picking each element from the unsorted portion and inserting it into its correct position in the sorted portion, shifting elements as needed.
Key ElementThe key element is the current element being picked from the unsorted portion to be inserted into its correct position in the sorted portion during Insertion Sort.
Time ComplexityTime complexity of an algorithm is a measure of the amount of time required by an algorithm to run as a function of the input size n. It provides an estimate of the number of elementary operations performed.
Big-O NotationBig-O notation O(f(n)) describes the upper bound of the time complexity of an algorithm. It represents the worst-case scenario of how the running time grows relative to the input size n.
Best Case ComplexityThe minimum number of operations an algorithm performs for an input of size n. For example, Bubble Sort best case is O(n) when the array is already sorted.
Worst Case ComplexityThe maximum number of operations an algorithm performs for any input of size n. For example, Bubble Sort worst case is O(n^2) when the array is in reverse sorted order.
Average Case ComplexityThe expected number of operations an algorithm performs over all possible inputs of size n. It gives a realistic estimate of algorithm performance.
Sortingthe process of arranging data elements in ascending or descending order.
Bubble Sort compares and swaps adjacent elements; largest element bubbles to the end in each pass.
💻 Key Syntax & Commands
  • Bubble Sort Time Complexity (Worst/Average) O(n^2) Occurs when the array is sorted in reverse order. Total comparisons = n(n-1)/2.
  • Bubble Sort Time Complexity (Best Case) O(n) Occurs when the array is already sorted (with optimized version using a flag). Only one pass with n-1 comparisons and no swaps.
  • Bubble Sort Space Complexity O(1) In-place sorting algorithm; only requires a temporary variable for swapping.
  • Total Comparisons (Worst Case) (n-1) + (n-2) + ... + 1 = n(n-1)/2 In pass i, the number of comparisons is (n - i).
  • Selection Sort Time Complexity (All Cases) O(n^2) Always performs n(n-1)/2 comparisons regardless of input order. Best, worst, and average cases are all O(n^2).
  • Selection Sort Space Complexity O(1) In-place sorting algorithm.
  • Maximum Number of Swaps n - 1 At most one swap per pass, making it efficient when swapping is costly.
  • Insertion Sort Time Complexity (Worst Case) O(n^2) Occurs when the array is sorted in reverse order. Total comparisons and shifts = n(n-1)/2.
  • Insertion Sort Time Complexity (Best Case) O(n) Occurs when the array is already sorted. Only n-1 comparisons and no shifts needed.
  • Insertion Sort Time Complexity (Average Case) O(n^2) On average, each insertion requires shifting half of the sorted portion.
  • Insertion Sort Space Complexity O(1) In-place sorting algorithm; only needs a variable to hold the key.
  • Constant Time O(1) Time does not depend on input size. Example: accessing an array element by index.
  • Logarithmic Time $O(\log n)$ Time grows logarithmically. Example: Binary Search.
  • Linear Time O(n) Time grows linearly with input size. Example: Linear Search.
  • Quadratic Time O(n^2) Time grows quadratically. Example: Bubble Sort, Selection Sort, Insertion Sort (worst case).

💡 Quick Tips & Memory Aids

  • Bubble Sort compares adjacent elements and swaps if out of order
  • After each pass, the largest unsorted element reaches its correct position
  • Maximum n-1 passes are needed for n elements
  • Optimization: if no swaps in a pass, list is already sorted — stop early
  • Worst case: O(n^2) comparisons and O(n^2) swaps
  • Best case (already sorted, with optimization): O(n) comparisons, 0 swaps
  • Bubble Sort is stable and in-place

📝 Exercise Overview

  • 10 total questions across 1 exercise
  • 7 long-answer / programming questions
  • 3 short-answer questions
Chapter 6
Searching
Linear Search · Binary Search · Search by Hashing
Supplementary

🎯 Must-Read — Key concepts for this chapter

  1. Searching is one of the most fundamental operations in computer science
  2. The choice of search algorithm depends on whether data is sorted or unsorted
  3. Linear Search works on both sorted and unsorted data
  4. Binary Search requires data to be sorted
  5. Efficiency is measured by the number of comparisons made

📖 Chapter Summary

ConceptKey Fact
SearchingSearching is the process of locating a given element (called the search key) in a collection of data. If the element is found, the search is successful and typically returns the position; otherwise, it is unsuccessful.
Search KeyThe search key is the specific value or element that is being looked for within a data collection during a search operation.
Linear SearchLinear Search (or Sequential Search) is a searching algorithm that checks each element of a list sequentially, starting from the first element, until the desired element is found or the end of the list is reached.
Binary SearchBinary Search is an efficient searching algorithm that works on sorted lists by repeatedly dividing the search interval in half. It compares the target value with the middle element and eliminates half of the remaining elements in each step.
Divide and ConquerDivide and Conquer is an algorithmic paradigm that breaks a problem into smaller sub-problems, solves each sub-problem, and combines the results. Binary Search divides the search space in half at each step.
HashingHashing is a technique used to uniquely identify a specific object from a group of similar objects. It uses a hash function to map data of arbitrary size to fixed-size values (hash codes) that serve as indices in a hash table.
Hash FunctionA hash function is a function that takes a key as input and returns an index (hash value) in the hash table where the corresponding value can be stored or retrieved. A common hash function is h(key) = key % table_size.
Hash TableA hash table is a data structure that stores key-value pairs. It uses a hash function to compute an index into an array of slots, from which the desired value can be found.
CollisionA collision occurs when two different keys produce the same hash value (index) through the hash function. Collisions must be resolved to store both values.
Linear ProbingLinear probing is a collision resolution technique in which, if a collision occurs at index i, the algorithm sequentially checks i+1, i+2, i+3, ... (wrapping around) until an empty slot is found.
ChainingChaining is a collision resolution technique where each slot in the hash table holds a linked list (or Python list) of all elements that hash to the same index.
Searchingthe process of finding a specific element in a collection of data.
Linear Search checks each element sequentially; time complexityO(n).
Binary Search works on sorted data using divide and conquer; time complexityO(log n).
Binary Searchsignificantly faster than Linear Search for large sorted datasets.
💻 Key Syntax & Commands
  • Linear Search Time Complexity (Best Case) O(1) Element is found at the first position. Only 1 comparison needed.
  • Linear Search Time Complexity (Worst Case) O(n) Element is at the last position or not present. All n elements are compared.
  • Linear Search Time Complexity (Average Case) O(n) On average, n/2 comparisons are needed. Still linear.
  • Linear Search Space Complexity O(1) Only a few variables are used regardless of input size.
  • Binary Search Time Complexity (Best Case) O(1) Element is found at the middle position in the first comparison.
  • Binary Search Time Complexity (Worst Case) $O(\log_2 n)$ Maximum number of comparisons is floor(log2(n)) + 1. The search space halves each time.
  • Binary Search Time Complexity (Average Case) $O(\log_2 n)$ On average, approximately log2(n) comparisons are needed.
  • Binary Search Space Complexity (Iterative) O(1) Iterative version uses constant extra space.
  • Middle Element Index mid = (low + high) // 2 low is the start index and high is the end index of the current search range.
  • Common Hash Function (Division Method) h(key) = key \% table\_size The modulo operation ensures the hash value falls within the valid index range [0, table_size - 1].
  • Hashing Time Complexity (Average Case) O(1) Average-case search, insert, and delete are constant time with a good hash function.
  • Hashing Time Complexity (Worst Case) O(n) Worst case occurs when all keys hash to the same index (all collisions).

💡 Quick Tips & Memory Aids

  • Linear Search examines each element one by one from start to end
  • Best case: 1 comparison (element at first position)
  • Worst case: n comparisons (element at last position or not found)
  • Average case: n/2 comparisons
  • Does not require sorted data
  • Simple to implement but inefficient for large datasets
  • Python implementation: def linear_search(a, key): for i in range(len(a)): if a[i] == key: return i return -1

📝 Exercise Overview

  • 10 total questions across 1 exercise
  • 7 long-answer / programming questions
  • 3 short-answer questions
Chapter 7
Understanding Data
Data Collection · Data Storage · Data Processing · Statistical Techniques for Data Processing
Supplementary

🎯 Must-Read — Key concepts for this chapter

  1. Data is raw facts; information is processed data with meaning
  2. Qualitative data describes qualities (categories); quantitative data deals with numbers
  3. Discrete data: whole numbers (e.g., number of books). Continuous data: any value in a range (e.g., temperature)
  4. Data → Processing → Information → Analysis → Knowledge → Wisdom
  5. Data is the foundation of all computing and data science applications

📖 Chapter Summary

ConceptKey Fact
DataData is a collection of raw, unprocessed facts and figures. It can be in the form of numbers, text, images, audio, or video. Data by itself has no meaning until it is processed and interpreted.
InformationInformation is data that has been processed, organized, and structured in a meaningful way. It provides context and is useful for decision making.
Qualitative DataQualitative data (also called categorical data) describes qualities or characteristics. It is non-numerical and includes categories such as colors, names, labels, and opinions.
Quantitative DataQuantitative data represents measurable quantities and is expressed as numbers. It can be discrete (countable, e.g., number of students) or continuous (measurable, e.g., height, weight).
Primary DataPrimary data is data collected directly by the researcher for a specific research purpose through surveys, experiments, interviews, or direct observation. It is original and first-hand.
Secondary DataSecondary data is data that has already been collected by someone else for a different purpose and is available for reuse. Examples include government reports, published research, and databases.
SurveyA survey is a data collection method that involves asking a set of questions to a group of people to gather information about their opinions, behaviors, or characteristics.
SamplingSampling is the process of selecting a representative subset (sample) from a larger population to make inferences about the entire population.
CSV FileA CSV (Comma-Separated Values) file is a plain text file that stores tabular data where each line represents a row and values within a row are separated by commas.
Structured DataStructured data is data that is organized in a predefined format, typically in rows and columns (tables), making it easy to search, sort, and analyze. Examples include relational databases and spreadsheets.
Unstructured DataUnstructured data is data that does not have a predefined format or organization. Examples include text documents, images, audio files, and social media posts.
Data CleaningData cleaning (or data cleansing) is the process of identifying and correcting (or removing) errors, inconsistencies, and inaccuracies in a dataset to improve its quality.
Data TransformationData transformation is the process of converting data from one format, structure, or value to another. Examples include converting units, encoding categorical variables, and normalizing values.
Missing ValueA missing value is a data point that is absent from the dataset. Missing values can result from data entry errors, equipment malfunction, or non-response in surveys.
ImputationImputation is the process of replacing missing data with substituted values, such as the mean, median, or mode of the available data.
💻 Key Syntax & Commands
  • Mean (Arithmetic Mean) $\bar{x} = \frac{\sum_{i=1}^{n} x_i}{n} = \frac{x_1 + x_2 + ... + x_n}{n}$ Sum of all values divided by the count of values.
  • Median (Odd n) $Median = x_{(n+1)/2}$ Middle value when n is odd and data is sorted.
  • Median (Even n) $Median = \frac{x_{n/2} + x_{(n/2)+1}}{2}$ Average of two middle values when n is even and data is sorted.
  • Range $Range = x_{max} - x_{min}$ Difference between the largest and smallest values.
  • Variance (Population) $\sigma^2 = \frac{\sum_{i=1}^{n} (x_i - \bar{x})^2}{n}$ Average of squared deviations from the mean. Uses n in the denominator for population variance.
  • Variance (Sample) $s^2 = \frac{\sum_{i=1}^{n} (x_i - \bar{x})^2}{n - 1}$ Uses (n-1) in the denominator to provide an unbiased estimate.
  • Standard Deviation $\sigma = \sqrt{\frac{\sum_{i=1}^{n} (x_i - \bar{x})^2}{n}}$ Square root of variance. Expressed in the same units as the data.

💡 Quick Tips & Memory Aids

  • Primary data is original and collected for a specific purpose
  • Secondary data is pre-existing and collected by others
  • Surveys and questionnaires are common primary data collection methods
  • Government databases and published reports are examples of secondary data
  • Sampling allows studying a population without examining every member
  • Data quality depends on the collection method, sample size, and design
  • CSV files are simple and widely used for storing tabular data

📝 Exercise Overview

  • 10 total questions across 1 exercise
  • 4 long-answer / programming questions
  • 6 short-answer questions
Chapter 8
Database Concepts
File System vs DBMS · Database Management System · Relational Data Model · Keys in a Relational Database
5marks

🎯 Must-Read — Key concepts for this chapter

  1. A database stores related data in an organized manner
  2. DBMS is the software used to manage databases
  3. DBMS provides data independence, security, integrity, and concurrent access
  4. Examples of DBMS: MySQL (open-source), Oracle, PostgreSQL, MS SQL Server
  5. File system limitations: redundancy, inconsistency, isolation, security issues, no concurrent access

📖 Chapter Summary

ConceptKey Fact
DatabaseA database is an organized collection of structured data (or information) stored electronically, so that it can be easily accessed, managed, and updated.
Database Management System (DBMS)A Database Management System (DBMS) is a software system that provides an interface for users and applications to define, create, maintain, and control access to a database. It acts as an intermediary between the user and the database.
Data RedundancyData redundancy is the unnecessary duplication of data across multiple files. It wastes storage and can lead to data inconsistency when one copy is updated but others are not.
Data InconsistencyData inconsistency occurs when multiple copies of the same data have different values due to redundancy, leading to unreliable and conflicting information.
Data IsolationData isolation is a problem in file systems where data is scattered in various files with different formats, making it difficult to write programs to retrieve appropriate data.
Data AbstractionData abstraction hides the complexity of data storage from users. It has three levels: Physical level (how data is stored), Logical level (what data is stored and relationships), and View level (part of database relevant to a particular user).
Data IndependenceData independence is the ability to modify the schema at one level without affecting the schema at the next higher level. Physical data independence means changing storage without affecting logical schema. Logical data independence means changing logical schema without affecting external views.
Database Administrator (DBA)A Database Administrator (DBA) is a person responsible for managing the database system, including defining the schema, setting access permissions, backup and recovery, performance tuning, and ensuring data security and integrity.
Relation (Table)In the relational model, a relation is a two-dimensional table consisting of rows and columns. Each relation has a unique name and stores data about a particular entity.
Attribute (Column)An attribute is a column in a relation (table) that represents a particular property of the entity. For example, in a STUDENT table, Name, RollNo, and Marks are attributes.
Tuple (Row)A tuple is a single row in a relation (table) that represents one record or instance of the entity. Each tuple contains values for all attributes of the relation.
DomainThe domain of an attribute is the set of all permissible values that the attribute can take. For example, the domain of Marks might be integers from 0 to 100.
DegreeThe degree of a relation is the number of attributes (columns) in the relation. For example, a table with columns RollNo, Name, Marks has degree 3.
CardinalityThe cardinality of a relation is the number of tuples (rows) in the relation. Cardinality changes as rows are inserted or deleted.
SchemaA relation schema defines the structure of a relation, including its name, attribute names, and their domains. Example: STUDENT(RollNo, Name, Class, Marks).

💡 Quick Tips & Memory Aids

  • DBMS advantages: reduced redundancy, data consistency, data sharing, data security, data integrity, concurrent access, backup and recovery
  • File system: data stored in flat files with no relationships defined
  • DBMS: data stored in structured tables with relationships, constraints, and access control
  • DBMS provides data abstraction — users do not need to know how data is stored internally
  • DBMS functions: define, create, manipulate, share, protect, and maintain databases
  • Three levels of data abstraction: Physical (storage), Logical (structure), View (user perspective)
  • Data independence allows changes at one level without affecting other levels

📝 Exercise Overview

  • 10 total questions across 1 exercise
  • 4 long-answer / programming questions
  • 6 short-answer questions
Chapter 9
Structured Query Language (SQL)
SQL Overview — DDL, DML, DCL · Data Types and Constraints in MySQL · SQL for Data Definition (DDL) · SQL for Data Manipulation — INSERT, UPDATE, DELETE · SQL for Data Query — SELECT · Aggregate Functions in SQL · String Functions in SQL · GROUP BY and HAVING Clauses · Operations on Relations — JOIN and Set Operations · Using Two Relations in a Query
15marks

🎯 Must-Read — Key concepts for this chapter

  1. SQL is the standard language for relational database management
  2. SQL is declarative — specify what data you need, not the steps to get it
  3. SQL keywords are case-insensitive; table/column names may be case-sensitive depending on the system
  4. SQL statements end with a semicolon (;)
  5. MySQL is the RDBMS used in the CBSE syllabus for practical work

📖 Chapter Summary

ConceptKey Fact
SQL (Structured Query Language)SQL is a standard programming language used to manage and manipulate relational databases. It allows users to create, read, update, and delete data (CRUD operations) using declarative statements.
MySQLMySQL is a popular open-source Relational Database Management System (RDBMS) that uses SQL for querying and managing databases. It is widely used in web applications.
QueryA query is a request for data or information from a database. In SQL, queries are written using statements like SELECT to retrieve specific data from one or more tables.
DDL (Data Definition Language)DDL is a subset of SQL used to define and modify the structure of database objects such as databases, tables, and indexes. DDL commands include CREATE, ALTER, DROP, and TRUNCATE.
DML (Data Manipulation Language)DML is a subset of SQL used to retrieve, insert, update, and delete data in database tables. DML commands include SELECT, INSERT, UPDATE, and DELETE.
DCL (Data Control Language)DCL is a subset of SQL used to control access to data in the database. DCL commands include GRANT (to give permissions) and REVOKE (to remove permissions).
CHAR(n)CHAR(n) is a fixed-length string data type that stores exactly n characters. If the stored string is shorter than n, it is padded with spaces. Maximum size: 255 characters.
VARCHAR(n)VARCHAR(n) is a variable-length string data type that stores up to n characters. It uses only as much space as the actual string length plus 1-2 bytes for length information. Maximum size: 65,535 characters.
INTINT (or INTEGER) is a numeric data type that stores whole numbers (no decimal places). Range: -2,147,483,648 to 2,147,483,647.
FLOATFLOAT is a numeric data type that stores approximate floating-point numbers (numbers with decimal places). It uses 4 bytes of storage.
DATEDATE is a data type that stores date values in the format YYYY-MM-DD. Range: '1000-01-01' to '9999-12-31'.
NOT NULL ConstraintThe NOT NULL constraint ensures that a column cannot contain NULL (empty) values. Every row must have a value for this column.
UNIQUE ConstraintThe UNIQUE constraint ensures that all values in a column (or combination of columns) are distinct. No two rows can have the same value in a UNIQUE column.
PRIMARY KEY ConstraintThe PRIMARY KEY constraint uniquely identifies each row in a table. It is a combination of NOT NULL and UNIQUE. A table can have only one primary key.
DEFAULT ConstraintThe DEFAULT constraint provides a default value for a column when no value is specified during insertion. Example: DEFAULT 0 for marks.
💻 Key Syntax & Commands
  • COUNT SELECT COUNT(*) FROM table_name; COUNT(*) counts all rows. COUNT(column) counts non-NULL values.
  • SUM SELECT SUM(column) FROM table_name; Returns the total of all values in the column. NULL values are ignored.
  • AVG SELECT AVG(column) FROM table_name; Returns the average. NULL values are excluded from the calculation.
  • MAX and MIN SELECT MAX(column), MIN(column) FROM table_name; Returns the largest and smallest values respectively.
  • Cartesian Product Size $Rows = m \times n, \; Columns = p + q$ If table A has m rows and p columns, table B has n rows and q columns.

💡 Quick Tips & Memory Aids

  • DDL defines structure: CREATE (create objects), ALTER (modify structure), DROP (delete objects)
  • DML manipulates data: SELECT (retrieve), INSERT (add), UPDATE (modify), DELETE (remove)
  • DCL controls access: GRANT (give permissions), REVOKE (remove permissions)
  • SELECT is technically DQL (Data Query Language) but often classified under DML
  • DDL commands auto-commit; DML commands can be rolled back (in transactional databases)
  • CHAR(n) is fixed-length (padded with spaces); VARCHAR(n) is variable-length (saves space)
  • Use CHAR for fixed-length data (e.g., gender 'M'/'F'); VARCHAR for variable-length (e.g., names)

📝 Exercise Overview

  • 16 total questions across 1 exercise
  • 9 long-answer / programming questions
  • 7 short-answer questions
Chapter 10
Computer Networks
Evolution of Networking · Types of Networks · Network Devices · Networking Topologies · Identifying Nodes in a Networked Communication · Internet, Web and the Internet of Things · Domain Name System
5marks

🎯 Must-Read — Key concepts for this chapter

  1. A computer network allows communication and resource sharing between connected devices
  2. Advantages of networking include file sharing, hardware sharing (printers, scanners), internet sharing, communication (email, video conferencing), and centralized data management
  3. Networks can follow client-server or peer-to-peer architecture
  4. A server provides services to clients; in peer-to-peer, each node can act as both
  5. Networking reduces cost by sharing expensive resources like printers and storage

📖 Chapter Summary

ConceptKey Fact
Computer NetworkA computer network is an interconnection of computers and other devices that can communicate with each other and share hardware, software, and data resources.
NodeAny device connected to a network that is capable of sending, receiving, or forwarding information is called a node. Examples include computers, printers, servers, and smartphones.
ServerA server is a computer on a network that provides services and resources (such as files, printers, or applications) to other computers (clients) on the network.
ClientA client is a computer on a network that requests and uses the services and resources provided by a server.
Peer-to-Peer NetworkA network in which each computer can act as both a server and a client, sharing resources directly with other computers without a dedicated server.
ARPANETAdvanced Research Projects Agency Network (ARPANET) was the first wide-area packet-switching network, developed by the US Department of Defense in 1969. It initially connected four universities: UCLA, Stanford, UC Santa Barbara, and University of Utah.
NSFNETNational Science Foundation Network (NSFNET) was a network established in 1986 by the US National Science Foundation to connect five supercomputer centers. It eventually replaced ARPANET as the backbone of the Internet.
InternetThe Internet is a global network of interconnected computer networks that use the TCP/IP protocol suite to communicate. It evolved from ARPANET and NSFNET and became publicly accessible in the 1990s.
PAN (Personal Area Network)A PAN is a network of personal devices such as smartphones, tablets, laptops, and wearable devices, typically within a range of about 10 metres. Examples include Bluetooth and infrared connections.
LAN (Local Area Network)A LAN is a network that connects computers and devices within a small geographical area such as a room, building, or campus. It typically spans up to a few kilometres and offers high data transfer rates (10 Mbps to 1 Gbps or more).
MAN (Metropolitan Area Network)A MAN is a network that spans a city or a large campus, typically covering a range of 5 to 50 kilometres. It connects multiple LANs within a metropolitan area. Cable TV network is an example of MAN.
WAN (Wide Area Network)A WAN is a network that spans a large geographical area, such as a country or the entire world. The Internet is the largest WAN. WANs typically use leased telecommunication lines and satellites.
ModemModem (Modulator-Demodulator) is a device that converts digital signals from a computer into analog signals for transmission over telephone lines (modulation) and converts incoming analog signals back to digital form (demodulation).
Ethernet Card (NIC)An Ethernet card or Network Interface Card (NIC) is a hardware component that connects a computer to a network using an Ethernet cable. Each NIC has a unique MAC address. It operates at speeds of 10/100/1000 Mbps.
RJ45 ConnectorRJ45 (Registered Jack 45) is a standard connector used to connect Ethernet cables to network devices. It has 8 pins and is used with twisted pair cables for LAN connections.
💻 Key Syntax & Commands
  • Number of links in Mesh Topology Number of links = n(n-1)/2, where n is the number of devices Each device has (n-1) ports. For example, 5 devices need 5(4)/2 = 10 links.
  • Number of ports per device in Mesh Ports per device = n - 1 Each device must have (n-1) I/O ports to connect to every other device.
  • Total IPv4 Addresses 2^32 = 4,294,967,296 (approximately 4.3 billion) 32-bit address space, each octet ranges from 0 to 255
  • Total IPv6 Addresses 2^128 = approximately 3.4 x 10^38 128-bit address space, providing virtually unlimited addresses

💡 Quick Tips & Memory Aids

  • ARPANET (1969) was the first computer network, funded by the US Department of Defense (ARPA/DARPA)
  • ARPANET initially connected 4 nodes at UCLA, Stanford Research Institute, UC Santa Barbara, and University of Utah
  • ARPANET used packet switching technology for data transfer
  • NSFNET (1986) was created to connect supercomputer centers for academic and research use
  • NSFNET replaced ARPANET as the main backbone network
  • Tim Berners-Lee invented the World Wide Web (WWW) in 1989 at CERN
  • The Internet became publicly available in the early 1990s after commercialization

📝 Exercise Overview

  • 12 total questions across 1 exercise
  • 3 long-answer / programming questions
  • 9 short-answer questions
Chapter 11
Data Communication
Concept of Communication · Measuring Capacity of Communication Media · Types of Data Communication · Switching Techniques · Transmission Media · Mobile Telecommunication Technologies · Protocols
5marks

🎯 Must-Read — Key concepts for this chapter

  1. Data communication requires five components: sender, receiver, message, transmission medium, and protocol
  2. The sender generates the data; the receiver accepts the data
  3. The message can be text, image, audio, video, or multimedia
  4. The medium can be wired (guided) or wireless (unguided)
  5. Protocols define the rules that both sender and receiver must follow for successful communication

📖 Chapter Summary

ConceptKey Fact
Data CommunicationData communication is the exchange of data (in the form of 0s and 1s) between two devices via some form of transmission medium such as a wire cable or wireless medium.
SenderThe sender (also called source or transmitter) is the device that generates and sends the message or data. It can be a computer, telephone, camera, or any other device.
ReceiverThe receiver (also called destination) is the device that receives the message or data sent by the sender. It can be a computer, telephone, printer, or any other device.
MessageThe message is the data or information to be communicated. It can be in the form of text, numbers, images, audio, video, or any combination of these.
Communication MediumThe communication medium (also called transmission medium or channel) is the physical path through which the message travels from sender to receiver. It can be wired (cable) or wireless (air, vacuum).
ProtocolA protocol is a set of rules that governs data communication. It defines the format, timing, sequence, and error control methods for data exchange between devices. Both sender and receiver must follow the same protocol.
BandwidthBandwidth is the range of frequencies available for transmission of data on a communication channel. It determines the maximum data transfer rate of the channel. Higher bandwidth means more data can be transmitted per unit time.
Data Transfer RateData transfer rate (also called bit rate) is the number of bits transmitted per second over a communication channel. It is measured in bits per second (bps).
Simplex CommunicationIn simplex mode, communication is unidirectional — data can flow in only one direction. Only one device can transmit and the other can only receive. Examples: keyboard to computer, radio broadcasting, TV broadcasting.
Half-Duplex CommunicationIn half-duplex mode, data can flow in both directions but not simultaneously. Only one device can transmit at a time while the other receives. Example: walkie-talkie.
Full-Duplex CommunicationIn full-duplex mode, data can flow in both directions simultaneously. Both devices can transmit and receive at the same time. Example: telephone conversation, video calling.
Circuit SwitchingIn circuit switching, a dedicated communication path (circuit) is established between the sender and receiver before data transfer begins. The circuit remains reserved for the entire duration of the communication, even if no data is being transmitted. Example: traditional telephone network (PSTN).
Packet SwitchingIn packet switching, the message is broken into smaller units called packets. Each packet is sent independently and may take different routes to reach the destination. Packets are reassembled at the destination in the correct order. Example: the Internet.
PacketA packet is a small unit of data that includes the actual data (payload), source address, destination address, sequence number, and error-checking information. Packets are the fundamental units of data in packet-switched networks.
Message SwitchingIn message switching, the entire message is sent from node to node. Each intermediate node stores the complete message and then forwards it to the next node (store-and-forward). No dedicated path is established.
💻 Key Syntax & Commands
  • Data Transfer Rate Units 1 Kbps = 1,024 bps (or 10^3 bps); 1 Mbps = 1,024 Kbps (or 10^6 bps); 1 Gbps = 1,024 Mbps (or 10^9 bps); 1 Tbps = 1,024 Gbps (or 10^12 bps) bps = bits per second, Kbps = Kilobits per second, Mbps = Megabits per second, Gbps = Gigabits per second, Tbps = Terabits per second
  • Time to transfer data Time = File Size (in bits) / Data Transfer Rate (in bps) Remember to convert file size from bytes to bits (multiply by 8) if given in bytes

💡 Quick Tips & Memory Aids

  • Bandwidth determines the capacity (maximum data transfer rate) of a communication channel
  • Higher bandwidth allows faster data transmission
  • Data transfer rate is measured in bps (bits per second)
  • Common units: bps, Kbps (10^3 bps), Mbps (10^6 bps), Gbps (10^9 bps), Tbps (10^12 bps)
  • 1 byte = 8 bits; when converting file size from bytes to bits, multiply by 8
  • Time to transfer = File size (bits) / Data transfer rate (bps)
  • Simplex: One-way communication only (e.g., keyboard input, radio, TV broadcast)

📝 Exercise Overview

  • 11 total questions across 1 exercise
  • 5 long-answer / programming questions
  • 6 short-answer questions
Chapter 12
Security Aspects
Threats and Prevention · Malware · Antivirus · Spam · HTTP vs HTTPS · Firewall · Cookies · Hackers and Crackers · Network Security Threats
Supplementary

🎯 Must-Read — Key concepts for this chapter

  1. Cyber threats can target confidentiality, integrity, and availability of data
  2. Common threats include malware, hacking, phishing, denial of service attacks, and data breaches
  3. Cyber security aims to protect systems and data from unauthorized access and attacks
  4. Prevention involves using antivirus software, firewalls, strong passwords, encryption, and regular updates
  5. Awareness and education are key components of cyber security

📖 Chapter Summary

ConceptKey Fact
Cyber ThreatA cyber threat is any malicious activity or potential danger that targets computer systems, networks, or data. Threats can come from malware, hackers, phishing attacks, or other sources aiming to steal, damage, or disrupt digital assets.
Cyber SecurityCyber security refers to the practice of protecting computers, servers, networks, data, and electronic systems from digital attacks, unauthorized access, damage, or theft. It involves technologies, processes, and practices designed to safeguard information.
Cyber CrimeCyber crime is any criminal activity that involves a computer, network, or digital device. It includes hacking, identity theft, phishing, cyberstalking, online fraud, and spreading malware.
MalwareMalware (malicious software) is any software intentionally designed to cause damage to a computer, server, network, or user. Types include viruses, worms, trojans, spyware, adware, and ransomware.
VirusA computer virus is a malicious program that attaches itself to a legitimate program or file and replicates itself when the host program is executed. It spreads from one computer to another through infected files, email attachments, or removable media. It requires human action to spread.
WormA worm is a standalone malicious program that replicates itself and spreads automatically across networks without attaching to a host program or requiring human action. Worms exploit network vulnerabilities and can consume bandwidth and system resources.
Trojan HorseA Trojan horse (or Trojan) is a malicious program disguised as legitimate or useful software. Unlike viruses and worms, Trojans do not replicate themselves. They trick users into installing them and then perform harmful actions such as stealing data, creating backdoors, or downloading other malware.
SpywareSpyware is malicious software that secretly monitors and collects user information such as browsing habits, keystrokes, passwords, and personal data without the user's knowledge or consent. It transmits this information to a third party.
AdwareAdware is software that automatically displays or downloads unwanted advertisements on a user's computer. While not always malicious, it can slow down systems, track browsing habits, and redirect browsers to advertising sites.
RansomwareRansomware is a type of malware that encrypts the victim's files or locks them out of their system and demands a ransom payment (usually in cryptocurrency) to restore access. Examples include WannaCry and Petya.
Antivirus SoftwareAntivirus software is a program designed to detect, prevent, and remove malware (viruses, worms, trojans, spyware, etc.) from a computer. It scans files, monitors system activity, and provides real-time protection. Examples: Norton, McAfee, Kaspersky, Avast, Windows Defender.
Virus SignatureA virus signature (or virus definition) is a unique pattern of code or data that identifies a specific virus. Antivirus software maintains a database of known virus signatures and compares files against this database during scanning.
SpamSpam refers to unsolicited, unwanted messages (usually emails) sent in bulk to a large number of recipients. Spam messages often contain advertisements, phishing links, or malware. They clog inboxes and waste bandwidth.
Spam FilterA spam filter is a program or feature that detects and blocks unwanted spam messages from reaching a user's inbox. It works by analyzing message content, sender reputation, and known spam patterns.
HTTPHTTP (HyperText Transfer Protocol) is a protocol for transferring data on the web. Data is sent in plain text, making it vulnerable to interception and eavesdropping. It uses port 80.

💡 Quick Tips & Memory Aids

  • Virus: Attaches to host files, needs human action to spread, replicates when host is executed
  • Worm: Self-replicating, spreads automatically over networks, does not need a host file
  • Trojan: Disguised as useful software, does not replicate, tricks users into installation
  • Spyware: Secretly monitors user activity, collects passwords and personal data
  • Adware: Displays unwanted advertisements, may track browsing habits
  • Ransomware: Encrypts files and demands payment for decryption, extremely dangerous
  • Key difference: Virus needs a host and human action; Worm spreads independently; Trojan disguises itself

📝 Exercise Overview

  • 11 total questions across 1 exercise
  • 2 long-answer / programming questions
  • 9 short-answer questions
Chapter 13
Project Based Learning
Approaches for Solving Projects · Teamwork · Project Descriptions and Examples
Supplementary

🎯 Must-Read — Key concepts for this chapter

  1. PBL is a student-centred approach where learning happens through working on real-world projects
  2. Benefits of PBL: develops problem-solving skills, critical thinking, creativity, teamwork, and communication skills
  3. PBL bridges the gap between theoretical knowledge and practical application
  4. Students take ownership of their learning and develop self-management skills
  5. PBL encourages collaboration and peer learning

📖 Chapter Summary

ConceptKey Fact
Project Based Learning (PBL)Project Based Learning is an instructional methodology where students learn by actively working on meaningful projects over an extended period. Students investigate and respond to real-world problems, developing deeper knowledge and skills through hands-on experience.
ProjectA project is a planned piece of work that involves investigation and creation of something, carried out over a period of time. In computer science, a project typically involves identifying a problem, designing a solution, writing code, and testing the final product.
Problem IdentificationThe first step in project development where the problem to be solved is clearly defined. This involves understanding the requirements, identifying the target users, and determining the scope and objectives of the project.
Planning and AnalysisThe phase where the project requirements are analyzed in detail, resources are identified, a timeline is created, and a plan is developed. This includes deciding on programming language, database, and tools to be used.
DesignThe phase where the solution architecture is planned. This includes designing the user interface, database schema, data flow diagrams, and algorithms. The design serves as a blueprint for implementation.
ImplementationThe phase where the actual code is written based on the design. This involves programming the solution using the chosen language and tools, creating the database, and building the user interface.
TestingThe phase where the developed software is tested for errors (bugs), correctness, and performance. Types include unit testing (individual components), integration testing (combined components), and user acceptance testing.
DebuggingDebugging is the process of finding and fixing errors (bugs) in the code. It involves identifying the cause of incorrect behaviour, locating the faulty code, and correcting it.
DeploymentThe phase where the completed and tested software is released to users. This includes installation, configuration, and making the application available for actual use.
TeamworkTeamwork is the collaborative effort of a group of individuals working together to achieve a common goal. In software projects, teamwork involves dividing tasks, communicating effectively, resolving conflicts, and combining individual contributions into a complete product.
Version ControlVersion control is a system that records changes to files over time, allowing you to recall specific versions later. It helps team members work on the same project simultaneously without overwriting each other's work. Examples: Git, SVN.
Project ManagerA project manager is the person responsible for planning, executing, and closing a project. They coordinate team activities, manage timelines and resources, and ensure the project meets its objectives.
Library Management SystemA software application for managing library operations including cataloguing books, tracking book issues and returns, managing member records, calculating fines, and generating reports. It typically uses a database (like MySQL) and a programming language (like Python).
Student Database Management SystemA software application for managing student records including personal details, enrollment information, marks, attendance, and reports. It uses database operations (CRUD — Create, Read, Update, Delete) to manage student data.
Quiz ApplicationA software application that presents questions to users, accepts answers, calculates scores, and displays results. It can be built using Python with a text-based or graphical interface, storing questions in a file or database.

💡 Quick Tips & Memory Aids

  • A good project addresses a real-world need or problem
  • Step 1 — Problem Identification: Clearly define the problem, understand requirements, identify users and scope
  • Step 2 — Planning and Analysis: Analyze requirements, plan resources and timeline, choose tools and technologies
  • Step 3 — Design: Create the solution blueprint — UI design, database design, algorithm design, flowcharts
  • Step 4 — Implementation: Write the actual code, build the database, create the user interface
  • Step 5 — Testing: Test for correctness, find and fix bugs, ensure all requirements are met
  • Step 6 — Deployment: Release the software to users, install and configure

📝 Exercise Overview

  • 6 total questions across 1 exercise
  • 2 long-answer / programming questions
  • 4 short-answer questions