Paper 2

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/65

flashcard set

Earn XP

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

66 Terms

1
New cards

Variables and constants

Use of named storage locations in code that can hold values (variable = changeable; constant = fixed)

2
New cards

Data types

Different kinds of data such as integer, real/float, Boolean, string

3
New cards

Operators

Arithmetic (+, -, *, /), relational (==, !=,

4
New cards

Input/output

Reading user input and displaying output to the user (e.g., input(), print())

5
New cards

Selection

Using if/else/elif to control the flow of a program

6
New cards

Iteration

Using loops (for, while) to repeat blocks of code

7
New cards

Subroutines

Reusable blocks of code: procedures (no return) and functions (with return)

8
New cards

Recursion

When a function calls itself to solve a smaller version of the problem

9
New cards

File handling

Reading/writing to external files using open(), read(), write(), close()

10
New cards

Exception handling

try/except blocks to catch and handle runtime errors

11
New cards

OOP: classes

Templates for objects that define properties and methods

12
New cards

OOP: objects

Instances of classes created using constructors

13
New cards

Top-down design

Breaking a problem down into smaller sub-problems

14
New cards

Stepwise refinement

Breaking down each sub-problem further until it's easily solvable

15
New cards

Modular code

Code divided into separate functions/modules for clarity and reuse

16
New cards

Global vs local variables

Global: used throughout the program; Local: used within subroutines

17
New cards

Naming conventions

Using clear, consistent names for variables and functions (e.g., camelCase, snake_case)

18
New cards

Comments and indentation

Writing helpful notes and using spacing to improve code readability

19
New cards

Abstraction

Removing unnecessary details to focus on key information

20
New cards

Decomposition

Breaking a complex problem into smaller parts

21
New cards

Algorithmic thinking

Creating step-by-step solutions to problems

22
New cards

Problem inputs, processes, outputs

Identifying the key components of a problem to solve it in code

23
New cards

Linear search

Searching through data one item at a time until a match is found

24
New cards

Binary search

Divides sorted data in half repeatedly to find a target item

25
New cards

Bubble sort

Repeatedly swaps adjacent elements if they are in the wrong order

26
New cards

Insertion sort

Builds a sorted list one item at a time by inserting into the correct place

27
New cards

Merge sort

Recursively divides list into halves, sorts and merges them

28
New cards

Quick sort

Picks a pivot, partitions data into pivot, then sorts recursively

29
New cards

Breadth-First Search

Explores nodes level by level (uses queue)

30
New cards

Depth-First Search

Explores as far as possible along a branch before backtracking (uses stack/recursion)

31
New cards

Dijkstra's algorithm

Finds the shortest path in a weighted graph from a start node to all others

32
New cards

A* algorithm

Similar to Dijkstra but uses heuristics to estimate cost to goal

33
New cards

Big-O notation

Describes time/space complexity of an algorithm (e.g., O(n), O(log n), O(n²))

34
New cards

Pseudocode

A structured but informal way of writing algorithms

35
New cards

Dry-running

Manually tracing through an algorithm with sample data

36
New cards

Trace tables

Tables used to track variable values as a program runs

37
New cards

1D arrays

List of elements accessed by a single index

38
New cards

2D arrays

Grid of elements accessed using two indices (rows and columns)

39
New cards

Records

Data structure that groups related fields under one name

40
New cards

Lists

Ordered collections of elements that can grow or shrink dynamically

41
New cards

Stacks

LIFO (Last In, First Out) structure with push, pop, and peek operations

42
New cards

Queues

FIFO (First In, First Out) structure with enqueue and dequeue operations

43
New cards

Circular queue

Queue that wraps around when it reaches the end

44
New cards

Priority queue

Elements are dequeued based on priority rather than order

45
New cards

Linked lists

Chain of nodes where each node links to the next

46
New cards

Binary tree

Each node has at most two children: left and right

47
New cards

Binary search tree

A binary tree where left < node < right

48
New cards

Graphs

Nodes connected by edges; can be directed/undirected, weighted/unweighted

49
New cards

Adjacency matrix

2D array showing connections between nodes

50
New cards

Adjacency list

List of nodes with their direct neighbours

51
New cards

Hash table

Maps keys to values using a hash function for fast access

52
New cards

Dictionaries

Key-value data structure (e.g., in Python)

53
New cards

Imperative programming

Code that follows a sequence of commands (e.g., Python)

54
New cards

OOP paradigm

Programming using classes and objects

55
New cards

Functional programming

Uses functions as first-class objects, avoids state and mutable data

56
New cards

Compare paradigms

Understanding the pros/cons of imperative, OOP, and functional styles

57
New cards

Software development lifecycle

Stages of creating software: analysis, design, implementation, testing, evaluation

58
New cards

Agile methodology

Iterative, flexible development approach with continuous feedback

59
New cards

Waterfall model

Linear, sequential development model

60
New cards

Black-box testing

Tests based on input/output without looking at code

61
New cards

White-box testing

Tests based on internal structure and logic of code

62
New cards

Alpha testing

Internal testing by developers before release

63
New cards

Beta testing

External user testing before final release

64
New cards

Validation

Ensuring inputs are acceptable (e.g., correct type/format)

65
New cards

Verification

Ensuring software matches the specification

66
New cards

IDE features

Tools like syntax checking, breakpoints, watches, stepping, debugging