Comprehensive Unit 1 Study Guide: Computational Thinking, Algorithmic Design, and Flowcharts

Fundamentals of Computer Science and the IPO Model

  • Definition of Computer Science: Computer science is the study of how problems can be solved in exact steps, and how computers carry out those steps. Writing program code is only the final implementation phase; foundational thinking, problem analysis, and procedural design come first.

  • Definition of a Computing System: A computing system is defined as any physical device or software program that accepts data, processes that data, and produces a result.

  • Definition of a Computer: A computer is any machine that takes in data, performs work on it by following explicit instructions, and yields a result. Everyday computing devices include mobile smartphones, video game consoles, smartwatches, calculators, and microcontroller chips embedded within domestic appliances such as microwave ovens.

  • The Input-Process-Output (IPO) Model:

    • Core Structure: Every computing system executes three fundamental operations in a strictly unidirectional flow: data moves in, through processing, and out as a result.

    • Input: The data that enters the system from an external source.

    • Process: The computational operations or actions performed on the input data. Process statements must always be defined using active verbs (such as adds, compares, checks, sorts, searches, converts, decides, or counts).

    • Output: The resulting information, physical state, or signal delivered back by the system (for example, numbers rendered on a screen, sound emitted from an acoustic transducer, captured photographic pixels, motor actuation, or illumination of an indicator light).

    • Data Dependency: Output depends entirely upon the combination of the incoming input and the specific processing performed. In addition, systems frequently integrate previously stored reference data (such as an audio track pre-existing within a digital music library).

    • The Role of Storage: While advanced computing references occasionally define a fourth component—storage (dedicated to retaining persistent files like gallery images)—foundational systems modeling classifies file saves directly as outputs.

IPO Calculator Model
  • Distinction Between Devices and Data:

    • Hardware Devices: Physical peripherals or sensors that capture or emit signals (e.g., keyboard, microphone, digital camera, thermal sensor, capacitive touchscreen, GPS receiver, speaker).

    • Data Entities: The actual informational content passed into or out of hardware (e.g., keystroke codes, audio waveform samples, optical light measurements, numerical ambient temperature, tap coordinate data, geographic coordinates, sound pressure waves).

    • Dual-Function Peripherals: Certain components perform dual input and output duties simultaneously; for example, a touchscreen acts as an input device by sensing touch coordinates and gestures, while concurrently acting as an output device by rendering visual graphics.

    • Common Modeling Mistake: Categorizing physical devices as inputs or outputs (e.g., recording "Input: Keyboard" or "Output: Screen"). The correct representation must specify the data itself, placing the peripheral in brackets if clarification is helpful: the keys pressed (keyboard).

  • The Principle of Garbage In, Garbage Out (GIGO):

    • An algorithmic processing step can function with absolute logical and mechanical perfection, yet yield an invalid output if the supplied input data is corrupted or erroneous.

    • Empirical Demonstration (Faulty Thermostat Sensor):

    • Real ambient room temperature: 15 ∘C15\,^\circ\text{C}.

    • User setting: 20 ∘C20\,^\circ\text{C}.

    • Malfunctioning hardware state: Sensor reports a reading 15 ∘C15\,^\circ\text{C} higher than reality (30 ∘C30\,^\circ\text{C}).

    • System processing step: Evaluates whether ambient temperature is strictly less than target setting (30<2030 < 20).

    • Evaluation: Comparison returns No (False).

    • System output: Heating remains switched OFF.

    • Diagnostic result: The decision process executed correctly according to its rules, but because the input was incorrect, the physical room remained unheated at 15 ∘C15\,^\circ\text{C}.

  • Catalogue of Standard IPO Systems:

    • Arithmetic Calculator (12×3=3612 \times 3 = 36):

    • Input: Specific key presses (12,×,3,=12, \times, 3, =).

    • Process: Multiplies numerical value 12 by numerical value 3.

    • Output: Value 36 shown on display.

    • Smart Home Climate Thermostat:

    • Input: Ambient room temperature reading from sensor (16 ∘C16\,^\circ\text{C}) and setpoint selected by user (21 ∘C21\,^\circ\text{C}).

    • Process: Compares sensor temperature against user setting to determine if heating threshold is met (16<21? Yes16 < 21\text{? Yes}).

    • Output: Actuates heating unit to ON and updates temperature reading on display.

    • Smartphone Digital Camera:

    • Input: Incident optical light from the scene, physical touch on shutter trigger button, and two-finger pinch gesture specifying optical/digital zoom.

    • Process: Converts light patterns into a coordinate grid of numeric pixels, adjusts exposure/brightness, and sharpens visual edge contrasts.

    • Output: Preview rendered on display screen and encoded image file saved into local storage gallery.

    • Streaming Music Application:

    • Input: Track selection or search query string typed into text box.

    • Process: Queries audio database for file match and retrieves/decodes bitstream.

    • Output: Acoustic signal produced through speakers/headphones and track metadata title printed on screen.

    • Transit Bus Tracking Platform:

    • Input: Vehicle telemetry coordinates sent from onboard GPS transceiver and passenger bus stop selection.

    • Process: Calculates spatial distance and estimated transit duration to target stop.

    • Output: Map graphic updated with bus position marker and numeric arrival countdown.

    • Biometric Fitness Watch:

    • Input: Inertial wrist acceleration/movement readings generated by internal motion sensor.

    • Process: Parses acceleration patterns and increments count upon detection of stride thresholds.

    • Output: Updated step count (e.g., 8,4128{,}412 steps) displayed on digital dial.

    • Automated Vending Machine:

    • Input: Currency coins/notes inserted (e.g., "$1.50""\$1.50") and alphanumeric selection buttons pressed.

    • Process: Checks if submitted funds meet required price, checks physical inventory stock, and calculates change differential.

    • Output: Dispenses item into tray, returns change coins, and shows confirmation prompt on LCD.

Abstraction and User Interfaces

  • Definition of Abstraction: Abstraction is the computational thinking technique of intentionally concealing complex operational details that a user does not need to see, exposing solely the controls and outputs necessary to interact with the system.

  • Operational Principle: Concealing steps does not imply that those steps do not occur. Hidden internal operations still execute every time an interaction is triggered; they simply operate out of user sight.

Light Switch Abstraction Model
  • The Physical Analogy of the Light Switch:

    • Visible Interface Layer: The physical rocker switch plate and the illuminating light bulb.

    • Concealed Abstracted Layer: In-wall copper electrical wiring, circuit breakers, and power supply grid distribution.

    • Evaluation: An individual operates the light without mastering the electrical laws of circuit impedance or current delivery. The internal infrastructure remains fully engaged and essential.

  • System Interface Definition:

    • The interface comprises the physical and graphical elements of an application that the user directly observes, touches, or interacts with (e.g., application windows, text input fields, operational buttons, status indicators, and notification popups).

    • Relationship to IPO: The interface provides the sensory surface for entering inputs and viewing outputs. In contrast, virtually the entirety of the process stage takes place beneath this layer.

    • Common Identification Error: Classifying a visual control element—such as a "Send" button or "Pay" button—as a hidden step. If an element is physically rendered on screen, it belongs to the interface; a hidden step must represent an internal computational action starting with an operational verb.

  • Comprehensive Hidden Process Workflows:

    • Network Message Dispatch (Two Taps In, One Tick Out):

    • Visible Input: User types textual characters and taps the graphical Send button.

    • Concealed Steps (executed in strict sequence):

      1. Verifies that message payload is not blank.

      2. Packages data packet with sender identity, recipient routing metadata, and exact timestamp.

      3. Transmits packet payload over local Wi-Fi/cellular network and internet routers.

      4. Commits and archives an encrypted copy onto cloud server databases.

      5. Issues push notification wake-up signal to recipient device hardware.

    • Visible Output: Sent message bubble appears in conversation thread accompanied by a "Delivered ✓" verification checkmark.

    • Food Ordering Application Transaction:

    • Visible Interface: Interactive restaurant menu, item basket counter, "Pay" button, "Order confirmed" modal, and driver tracking map.

    • Concealed Operational Steps:

      1. Pings merchant point-of-sale system to verify operating hours and menu stock availability.

      2. Computes monetary invoice total, applying variable delivery surcharges and municipal taxes.

      3. Connects to banking payment gateway to authenticate account funds and approve transaction.

      4. Transmits finalized prep order to restaurant kitchen terminals.

      5. Polls nearby delivery drivers via GPS to assign nearest courier and begins telemetry tracking.

      6. Records invoice into user transaction history ledger.

  • Design Trade-Offs of Abstraction:

    • User Benefits:

    • Drastically lowers operational complexity.

    • Decreases user onboarding and learning duration.

    • Minimizes cognitive load, mental fatigue, and reading requirements.

    • Decreases rate of user operational mistakes.

    • User Vulnerabilities and Systemic Risks:

    • Loss of data sovereignty: The user cannot monitor how or where sensitive personal data is transferred.

    • Silent failure states: If an internal operation breaks or fails silently, the user cannot easily diagnose the source.

    • Opaque financial and security transactions: The user is unable to verify third-party data broker access or unintended financial commitments.

    • The Ethical Metric of Hidden Operations:

    • Hiding is considered constructive/helpful when the abstracted details govern solely internal mechanical efficiency (e.g., arithmetic multiplication algorithms inside a calculator app).

    • Hiding is considered a risk/harm whenever the concealed procedure directly affects user privacy, fiscal resources, or personal safety—particularly where knowledge of the hidden step would cause the user to reject the service (e.g., a photo editor uploading private photos to an external server while showing "Applying filter", or an e-commerce platform storing credit card credentials without opt-in consent).

Problem Decomposition

  • Definition of Decomposition: Decomposition is the foundational computational thinking process of breaking a complex, multifaceted problem down into smaller, self-contained sub-problems, which are subsequently broken down into atomic, ordered procedural steps.

  • Hierarchical Structure of Decomposition Trees:

    • Level 1 (Top Root): The overall primary problem to be resolved.

    • Level 2 (Sub-problems): Discrete, manageable jobs that collectively span the entirety of the primary objective. Every sub-problem description must begin with an active imperative verb.

    • Level 3 (Steps): Explicit, granular actions nested within a specific sub-problem, arranged in linear chronological order.

  • The Four Evaluative Tests for Decomposition:

    • 1. Complete: If every identified sub-problem and underlying step is executed to completion, is the overarching primary problem fully resolved without leaving unaddressed dependencies?

    • 2. Small Enough: Is each sub-problem sufficiently isolated that it can be carried out directly without requiring further major structural division?

    • 3. Belongs: Does every individual sub-problem and step contribute directly to solving the specific target problem, excluding extraneous or irrelevant tasks?

    • 4. Ordered: Are the actions positioned in a functionally valid execution sequence, particularly where the inputs to downstream sub-problems require the outputs of upstream sub-problems?

  • Common Decomposition Flaws:

    • Formulating a sub-problem that is identical in scope to the main challenge (e.g., listing "Do the event" under "Plan an event").

    • Writing static nominal topics rather than functional tasks (e.g., labeling a branch "Books" instead of "Collect books").

    • Injecting non-contributing objectives (e.g., inserting "Collect money for class trip" under "Organise a class book drive").

  • Exhaustive Decomposition Worked Models:

    • Case Study 1: Plan an Online Class Event

    • Sub-problem 1: Choose the date and time

      • Step 1: Check the school master academic calendar.

      • Step 2: Pick a time window when all students are free.

    • Sub-problem 2: Invite the class

      • Step 1: Draft the event invitation text.

      • Step 2: Post the invitation with the meeting hyperlink directly in Schoology.

    • Sub-problem 3: Prepare the activities

      • Step 1: Select a collaborative quiz or group game.

      • Step 2: Assemble and design the slide presentation deck.

    • Sub-problem 4: Run the event

      • Step 1: Open the virtual call room 10 minutes prior to scheduled start.

      • Step 2: Follow the prepared activity schedule.

    • Sequential Constraint: Sub-problem 2 must occur before Sub-problem 4; running the room before invites are issued results in zero attendance.

    • Case Study 2: Plan a Week of School Lunches

    • Sub-problem 1: Plan the menu

      • Step 1: Survey student dietary preferences and medical/religious needs (e.g., allergies, Halal certifications).

      • Step 2: Choose five distinct, balanced meal plans.

    • Sub-problem 2: Buy the food

      • Step 1: Compile an itemized ingredient shopping list from the chosen menu.

      • Step 2: Purchase or place grocery delivery orders for all items.

    • Sub-problem 3: Cook and pack

      • Step 1: Cook the daily recipes fresh each morning.

      • Step 2: Pack meals securely into lunchboxes.

    • Sub-problem 4: Serve and clean up

      • Step 1: Hand out designated lunch packs to students.

      • Step 2: Collect, wash, and sanitize reusable lunchboxes.

    • Extraneous Element Analysis: The action "Buy a new lunch box" fails the Belongs test if the system scope covers meal planning and catering distribution rather than personal gear acquisition.

    • Case Study 3: Digital Library Book Checkout System

    • Primary Objective: Issue an e-book loan to a registered student.

    • Sub-problem 1: Find the book

      • Step 1: Read user search query characters.

      • Step 2: Display catalog records matching terms.

    • Sub-problem 2: Check the loan is allowed

      • Step 1: Verify student library account status is active and unrestricted.

      • Step 2: Query database to ensure digital license copy is available.

    • Sub-problem 3: Give the book

      • Step 1: Record timestamped due date onto student database record.

      • Step 2: Deliver and unlock encrypted book payload on student reading hardware.

    • Order Justification: Sub-problem 3 cannot precede Sub-problem 2; releasing file assets requires successful verification of borrowing eligibility.

    • Case Study 4: Production of a School Video

    • Valid Sub-problem Set: 1. Write the script; 2. Film the scenes; 3. Edit the video footage; 4. Share the final cut with the class.

    • Invalid Variants: Non-functional nouns ("Videos, Cameras, Editing") fail the action criterion; underspecified pairs ("Make video, Share video") fail the Small Enough test; adding tasks like "Change the school logo" fails the Belongs test.

Algorithms and Pseudocode

  • Definition and Etymology of Algorithm:

    • An algorithm is a formal, sequential list of instructions designed to resolve a specific problem or execute a task.

    • Historical Etymology: The term derives historically from algorismus, the Latinized translation of the surname of 9th-century Persian scholar and mathematician Muhammad ibn Musa al-Khwarizmi, which passed into Middle English as algorism (Toomer).

  • The Three Mandatory Rules of an Algorithm:

    • 1. Exact (Unambiguous): Every individual instruction must possess exactly one definitive interpretation. Terms like "wait a bit", "add some water", or "stir well" are invalid because computers cannot make subjective guesses.

    • 2. Ordered (Sequential): Steps must be organized in an uncompromising, correct logical order. Exchanging steps—such as pouring boiling water before turning on the kettle—results in failure.

    • 3. Finite (Terminating): The execution flow must possess an achievable end state. Any iterative loop structure must incorporate mechanisms that guarantee termination.

  • Definition and Role of Pseudocode:

    • Pseudocode is an intermediate algorithmic notation combining plain human language with standardized structural keywords.

    • Purpose: Serves as a bridge between loose, ambiguous natural language (English) and rigid programming syntax (e.g., Python). It frees the algorithm designer to refine structural logic prior to addressing technical compiler syntax rules.

    • Stylistic Conventions: Standard keywords are rendered strictly in full UPPERCASE. Statements execute sequentially from top to bottom. Variable names must never contain spaces (e.g., minutes_left, wants_milk).

  • The Five Universal Keywords:

    • INPUT: Retrieves an external value (from a human user, peripheral, or environmental sensor) and binds it to a named variable (e.g., INPUT age).

    • OUTPUT: Renders a variable value, numeric result, or static literal text string to the user interface (e.g., OUTPUT "Hello", OUTPUT change).

    • SET: Assigns the result of an internal data calculation, variable modification, or fixed assignment to a variable identifier (e.g., SET change = paid - price).

    • IF ... THEN ... ELSE: A selective conditional branching structure evaluating an explicit boolean condition. When true, the indented statements following THEN execute; when false, the indented statements following ELSE execute.

    • REPEAT WHILE: A pre-conditional loop that repeatedly executes an indented code block as long as its relational condition evaluates to True. Once the condition evaluates to False, the loop terminates.

  • Relational Operators in Conditional Expressions:

    • > : Strictly greater than.

    • < : Strictly less than.

    • >= : Greater than or equal to (at least).

    • <= : Less than or equal to (at most).

    • = : Equivalence check within boolean conditions (distinguished from SET variable = value, where = acts as an assignment/store operator).

  • Exhaustive Pseudocode Implementations:

    • Preparation of Tea:text INPUT strength Fill the kettle with water Switch the kettle on REPEAT WHILE the water is not boiling Wait 10 seconds Put one tea bag in a cup Pour the boiling water into the cup IF strength = "strong" THEN Wait 5 minutes ELSE Wait 2 minutes Take out the tea bag OUTPUT "Your tea is ready" &nbsp;&nbsp;&nbsp;&nbsp;

  • Change Calculation Mechanism:text INPUT price INPUT paid SET change = paid - price OUTPUT change &nbsp;&nbsp;&nbsp;&nbsp;

  • Retail Tax Evaluation:text INPUT price SET tax = price * 0.1 SET total = price + tax OUTPUT total &nbsp;&nbsp;&nbsp;&nbsp;

  • Determination of the Larger of Two Numbers:text INPUT a INPUT b IF a > b THEN OUTPUT a ELSE OUTPUT b &nbsp;&nbsp;&nbsp;&nbsp;

  • Liquid Vessel Refill Loop:text REPEAT WHILE the glass is not full Pour a little more water OUTPUT "The glass is full" &nbsp;&nbsp;&nbsp;&nbsp;

  • Critical Algorithmic Edge Case Analysis:

    • An edge case is an input value situated at the outer boundary of expected functional behavior, such as equivalent values in magnitude comparisons.

    • Evaluating the "larger of two numbers" algorithm with identical inputs (a=5,b=5a = 5, b = 5):

    • Evaluation: Evaluates boolean condition 5>55 > 5.

    • Result: Expression returns False.

    • Branch Execution: The THEN block is bypassed; the ELSE branch triggers, directing execution to OUTPUT b.

    • Mathematical Correctness: The algorithm outputs 5. Because both numbers are equal, returning either value represents a valid solution.

Flowchart Architecture and Standards

  • Definition of a Flowchart: A flowchart is a standardized visual schematic that represents the operations, decisions, and sequential control flow of an algorithm using standard geometric shapes connected by directional line arrows.

  • Standardized Flowchart Geometric Symbols:

    • Oval (Terminator): Denotes either the initial Start or terminal End of the algorithmic procedure. A Start oval features exactly 1 outgoing directional arrow; an End oval features 0 outgoing arrows.

    • Parallelogram (Input/Output): Denotes any operation that ingests data from the outside world (INPUT) or returns results to the outside world (OUTPUT). Features exactly 1 outgoing arrow.

    • Rectangle (Process): Denotes computational manipulation, internal calculations, or state storage (SET expressions). Features exactly 1 outgoing arrow.

    • Diamond (Decision): Represents a single relational conditional branch (IF ... THEN ... ELSE). Must contain an explicit boolean question. Always features exactly 2 outgoing arrows: one labelled Yes (true branch) and one labelled No (false branch).

    • Directional Arrow (Flowline): Connects shapes to establish the chronological path of data and control execution.

  • Formal Structural Rules:

    • Every flowchart must possess exactly one Start terminator and converge onto exactly one End terminator.

    • Flowchart shapes match their corresponding pseudocode statements line for line.

    • Dead ends (shapes with missing outgoing paths, excluding the End oval) are structurally invalid.

    • Process shapes (SET) must never be enclosed within parallelograms; conversely, INPUT and OUTPUT must never be enclosed within rectangles.

Symbol Key Reference
  • Worked Example: Complete Flowchart for Determining the Larger of Two Numbers:

Larger of Two Numbers Flowchart
  • Execution Trace of Control Flow:

    1. Start oval leads directly into parallelogram INPUT a.

    2. Path transitions to second parallelogram INPUT b.

    3. Path enters diamond testing a > b?.

    4. Branch 1 (Yes): Enters parallelogram OUTPUT a.

    5. Branch 2 (No): Enters parallelogram OUTPUT b.

    6. Convergence: Paths out of OUTPUT a and OUTPUT b merge into a single conduit entering the terminal End oval.

    • Evaluation of Defective Flowchart Architectures:

  • The Incomplete Decision Defect (Amal's Flowchart):

    • Setup: An algorithm testing temperature or variable sizes features a diamond with only a Yes branch leading to an output, omitting the No path entirely.

    • Failure State: If input conditions evaluate to False (such as testing a=3,b=8a = 3, b = 8 against 3>8?3 > 8\text{?}, or testing temperature 20 ∘C20\,^\circ\text{C} against temp<15?\text{temp} < 15\text{?}), execution reaches the decision node and encounters no available pathway.

    • Result: Execution halts abruptly. The system produces no output, failing the requirement that an algorithm must yield a result for every possible valid input.

    • Resolution: Create a complementary flowline labelled No routed directly to the appropriate alternative output or convergence point.

Tracing and Debugging Algorithms

  • Definition of Tracing: Tracing is the systematic, manual execution of an algorithm step by step, precisely as written on paper, without making assumptions regarding programmer intent.

  • Trace Table Architecture:

    • Columns: One dedicated left-hand column designating the Step (line) currently executing, one column per programmatic variable, and one final column logging console/screen Output.

    • Rows: Each sequential instruction or loop pass generates an independent row in chronological sequence.

    • Cell Value Protocol: A variable column cell is updated only when its value changes on that specific instruction. Unchanged variables are left blank to highlight state modifications.

    • Decision Statements: When tracing conditionals or loop tests, the logical check and its boolean evaluation must be recorded in the Step (line) column (e.g., 4 total > 9? 10 > 9 is Yes).

    • Skipped Statements: When branching bypasses an unselected code path (such as a bypassed ELSE block), standard tracing protocol notes skipped in the output column.

  • Syntax Errors vs. Logic Errors:

    • Syntax Error:

    • Nature: A violation of the formal lexical or grammatical rules of the language (e.g., misspelling a keyword as OUTPT, omitting THEN in a conditional, or unmatched quotation marks).

    • System Behavior: Execution is halted completely. The program refuses to run and generates an error code or message.

    • Logic Error:

    • Nature: The code adheres strictly to all syntactic and grammatical rules, enabling the program to run to completion without displaying error messages, but an incorrect operation produces an invalid result.

    • Typical Causes: Erroneous arithmetic operators (e.g., applying addition + instead of multiplication *), incorrect relational operators (e.g., using > instead of >=), inverted sequential logic, or off-by-one boundary evaluations.

    • Severity: Logic errors are significantly more dangerous than syntax errors because they deliver false outputs silently without warning.

Four Step Debugging Routine
  • The Four-Step Universal Debugging Protocol:

    • 1. Predict: Manually calculate the exact expected output for selected test cases before executing code.

    • 2. Trace: Step through the algorithm sequentially, recording variable states on a trace table row by row.

    • 3. Compare: Contrast the actual table output against the initial manual prediction. Identify the earliest row exhibiting an unexpected numerical value or output string.

    • 4. Fix and Retrace: Correct the single identified line of code. Retrace using the original test input, followed by boundary and edge-case inputs to prove the correction works.

  • Test Input Selection Strategies:

    • Always verify an algorithm using a minimum of two disparate test cases.

    • Ensure inputs exercise every independent branch of conditional statements.

    • Always include a boundary value—a test point positioned precisely on the threshold of a decision (such as test score 5050 on a pass/fail mark where score≥50\text{score} \ge 50, or value 99 in total>9\text{total} > 9).

  • The Single-Test Fallacy:

    • A single successful test execution does not demonstrate algorithmic correctness.

    • Demonstration (Defective Summation Algorithm C):text 1 INPUT n 2 SET total = 0 3 SET k = 1 4 REPEAT WHILE k <= n 5 SET total = total + 1 // LOGIC ERROR: should be total + k 6 SET k = k + 1 7 OUTPUT total &nbsp;&nbsp;&nbsp;&nbsp;

    • Evaluation with n=1n = 1: The loop executes a single cycle. total transitions from 00 to 0+1=10 + 1 = 1. The output is 11. The manual prediction for the sum of integers up to 1 is also 11.

    • Fallacy: The test passes, creating the false illusion of correctness.

    • Evaluation with n=4n = 4: Predicts 1+2+3+4=101 + 2 + 3 + 4 = 10. Tracing line 5 over four passes increments total by 1 each time, producing a final output of 44. The logic error is exposed only when multi-cycle tests are administered.

  • Exhaustive Trace Table Analyses:

    • Trace 1: Basic Decision Boundary (Warm-up)

    • Pseudocode: text 1 INPUT a 2 INPUT b 3 SET total = a + b 4 IF total > 9 THEN OUTPUT "Big" ELSE OUTPUT total &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

    • Test Case A: a=4,b=6a = 4, b = 6     | Step (line) | a | b | total | Output |     | :--- | :--- | :--- | :--- | :--- |     | 1 INPUT a | 4 | | | |     | 2 INPUT b | | 6 | | |     | 3 SET total = a + b | | | 10 | |     | 4 total > 9? 10 > 9 is Yes | | | | Big |

    • Test Case B (Boundary Test): a=4,b=5a = 4, b = 5     | Step (line) | a | b | total | Output |     | :--- | :--- | :--- | :--- | :--- |     | 1 INPUT a | 4 | | | |     | 2 INPUT b | | 5 | | |     | 3 SET total = a + b | | | 9 | |     | 4 total > 9? 9 > 9 is No | | | | 9 |

  • Trace 2: Three-Number Average (Algorithm A Logic Error Analysis)

    • Pseudocode: text 1 INPUT a 2 INPUT b 3 INPUT c 4 SET total = a + b + c 5 SET avg = total / 2 // ERROR: divides by 2 instead of 3 6 OUTPUT avg &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

    • Test Inputs: a=3,b=6,c=9a = 3, b = 6, c = 9. Target Prediction: 3+6+93=183=6\frac{3 + 6 + 9}{3} = \frac{18}{3} = 6.

    • Defective Execution Trace: Step 4 calculates total = 18. Step 5 computes avg = 18/2=918 / 2 = 9. Step 6 yields Output = 9. Compare phase identifies Line 5 as the root error.

    • Corrected Line: SET avg = total / 3.

    • Retrace Verification:     | Step (line) | a | b | c | total | avg | Output |     | :--- | :--- | :--- | :--- | :--- | :--- | :--- |     | 1 INPUT a | 3 | | | | | |     | 2 INPUT b | | 6 | | | | |     | 3 INPUT c | | | 9 | | | |     | 4 SET total = a + b + c | | | | 18 | | |     | 5 SET avg = total / 3 | | | | | 6 | |     | 6 OUTPUT avg | | | | | | 6 |

  • Trace 3: Ticket Pricing Computation

    • Pseudocode: text 1 INPUT price 2 SET cost = price + 3 // ERROR: adding instead of multiplying 3 OUTPUT cost &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

    • Target: Calculate price of 3 tickets where price = 5. Target Prediction: 5×3=155 \times 3 = 15.

    • Trace Table:     | Step (line) | price | cost | Output |     | :--- | :--- | :--- | :--- |     | 1 INPUT price | 5 | | |     | 2 SET cost = price + 3 | | 8 | |     | 3 OUTPUT cost | | | 8 |

    • Diagnosis: Row 2 contains the first erroneous value (88 instead of 1515). Line 2 contains a logic error. Fix: SET cost = price * 3.

  • Trace 4: Numerical Loop Sequencing (Algorithm B)

Algorithm B Loop Flowchart
  • Objective: Output whole integers from 1 through 5 inclusive.

  • Pseudocode: text 1 SET n = 1 2 REPEAT WHILE n < 5 // ERROR: strict inequality terminates prematurely 3 OUTPUT n 4 SET n = n + 1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

    • Defective Output Sequence: Emits 1,2,3,41, 2, 3, 4. When n=5n = 5, the check 5<55 < 5 returns False, causing the loop to exit before emitting 5.

    • Diagnosis: Line 2 terminates early due to an incorrect boundary operator. Fix: REPEAT WHILE n <= 5.

  • Trace 5: Temporal Unit Conversion

    • Pseudocode: text 1 INPUT minutes 2 SET hours = minutes * 60 // ERROR: multiplies by 60 instead of dividing 3 OUTPUT hours &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

  • Test Case: minutes = 120. Expected output: 120/60=2 hours120 / 60 = 2\,\text{hours}.

  • Defective Result: Step 2 calculates hours = 120×60=7,200120 \times 60 = 7{,}200. Step 3 yields Output 7,200.

  • Diagnosis: Logic error on Line 2. Fix: SET hours = minutes / 60.

Unit 1 Assessment Specifications and Academic Routines

  • Unit 1 Examination Structure:

    • Total Value: 30 Points.

    • Allotted Duration: 25 Minutes.

    • Pacing Milestones:

    • Part A (Predict): 10 points; target completion by Minute 9.

    • Part B (Debug): 5 points; target completion by Minute 13.

    • Part C (Modify): 9 points; target completion by Minute 21.

    • Part D (Explain): 6 points; target completion by Minute 25.

    • Formal Submission: 1 minute (Minute 25 to 26).

  • Standard Assessment Regulations:

    • Testing must occur independently with video cameras enabled throughout, maintaining clear line-of-sight on student faces and hands.

    • Zero-tolerance restriction against artificial intelligence tools, unauthorized external websites, and notes.

    • All application tabs must be closed with the sole exception of the Schoology assessment module.

    • Physical paper and pen are permitted strictly for sketching flowchart deliverables in Part C, which must be clearly photographed and embedded into the submission document.

  • Unit 1 Course Curriculum Schedule and Milestones:

    • Lesson 1.1 (Monday, Nov 2): Input, Process, Output and the IPO Model.

    • Lesson 1.2 (Tuesday, Nov 3): System Abstraction and Interface Layers.

    • Lesson 1.3 (Wednesday, Nov 4): Problem Decomposition and Tree Construction.

    • Lesson 1.4 (Thursday, Nov 5): Review, System Analysis, and Mid-Unit Quiz (8 questions, 24 points, 15 minutes).

    • Lesson 1.5 (Monday, Nov 9): Algorithms and Structured Pseudocode. Formal submission of the Computational Thinking Case Study (20 points total: Part A IPO 6 pts, Part B Hidden Steps 6 pts, Part C Decomposition 6 pts, Clarity 2 pts).

    • Lesson 1.6 (Tuesday, Nov 10): Flowchart Standard Conventions and Structural Mapping.

    • Lesson 1.7 (Wednesday, Nov 11): Program Tracing, Error Categorization, and Debugging Protocols.

    • Lesson 1.8 (Thursday, Nov 12): Unit 1 Summative Assessment (30 points) and Final Flowchart Revision.

    • Major Assignment Milestone (Monday, Nov 16): Submission of the comprehensive Algorithm Design Write-up (20 points total: Pseudocode 6 pts, Flowchart 5 pts, Trace Tables 5 pts, Logic Error Diagnostic Paragraph 4 pts). Unit 2 commences with Python programming syntax.

Classroom Discussions, Interactive Checks, and Dialogue

  • Hardware vs. Data Identification (Lesson 1.1):

    • Prompt: Select a household computing device. State what it takes in and what it gives out.

    • Student Response (Amina): TV remote. Takes in a button press. Gives out a signal to the TV.

    • Student Response (Yusuf): Phone. Takes in the screen. Gives out apps.

    • Evaluation: Amina's analysis is functionally correct: a button depression constitutes genuine input data, and a transmitted infrared/radio frequency pulse represents true output data. Yusuf incorrectly identified physical hardware ("the screen") as an input entity; the screen is the input device, whereas the coordinates of the physical tap represent the actual input data.

  • Defining Abstraction (Lesson 1.3):

    • Prompt: What does abstraction mean in your own words?

    • Student Response (Maryam): Abstraction means the app hides the steps I don't need, like how it sends my message.

    • Student Response (Bilal): Abstraction means it's abstract.

    • Evaluation: Maryam's response is strong because it explicitly establishes what is concealed and identifies the user as the beneficiary. Bilal's response is invalid because it merely restates the root word without explaining its functional role.

  • Identifying Hidden Network Steps (Lesson 1.2):

    • Prompt: You type a text message and tap Send. What occurs that you do not see?

    • Student Response (Zainab): It goes through the internet.

    • Student Response (Omar): It gets saved somewhere.

    • Student Response (Hana): The Send button.

    • Evaluation: Hana's response does not describe a hidden step. The Send button is a visible graphic rendered directly upon the user interface. A valid hidden step represents an internal action performed by the software behind the screen (as noted by Zainab and Omar).

  • Testing Decision Flowcharts (Lesson 1.6):

    • Prompt: In the larger-of-two flowchart, predict the output if a=5a = 5 and b=5b = 5.

    • Option A: Follows the Yes arrow and outputs 5 (aa).

    • Option B: Follows the No arrow and outputs 5 (bb).

    • Option C: Outputs nothing because neither number is larger.

    • Resolution: Option B is correct. Evaluating the relational condition 5>55 > 5 yields False, compelling the control flow down the No branch to output bb (55).

  • Evaluating Defective Decision Branches (Lesson 1.8):

    • Prompt: A temperature decision diamond contains only a Yes arrow (temperature<15\text{temperature} < 15 leads to OUTPUT "Wear a jacket"). A user enters 2020. What occurs?

    • Option A: Outputs "Wear a jacket" because it is the only existing arrow.

    • Option B: Outputs "No jacket needed" because the algorithm understands developer intent.

    • Option C: Nothing is output. The evaluation is No, and the No answer has nowhere to go.

    • Option D: An automated system error message appears stating an arrow is missing.

    • Resolution: Option C is correct. Computers cannot infer developer intent. Because the condition evaluates to No and no operational flowline exists for that state, execution dead-ends silently without generating an output.