Computer Science — Computational Thinking and Programming

Computer Science: Algorithms, Logic, Data, and Computational Thinking

Grades 4-12  |  Aurora Curriculum Pack
Aurora CS standard: An algorithm is a documented, ordered set of steps that produces the same result every time it is executed, by anyone, including someone who does not understand the purpose of the steps. A program is an algorithm that a computer can execute. The power of computing is not the technology — it is the documented logic that the technology follows.
Historical fact: Katherine Johnson, Dorothy Vaughan, and Mary Jackson — Black women mathematicians at NASA — wrote the computational algorithms that made human spaceflight possible. Dorothy Vaughan taught herself and her team FORTRAN (an early programming language) to program the first electronic computers at NASA. Their documented work is in the Smithsonian National Air and Space Museum and the NMAAHC.

Grade Band: 4-6 — Algorithms, Sequencing, Loops, and Conditionals

Grades 4-6
Key vocabulary for this band:
Algorithm: a set of instructions that solves a problem, in exact order
Sequence: steps in a specific order — order matters
Loop: a set of steps that repeats a number of times
Conditional: a step that only happens IF something is true (If-Then-Else)
Bug: an error in an algorithm that causes wrong output
Debug: finding and fixing a bug
Part 1 — Write a Precise Algorithm

Task: Write an algorithm for making a peanut butter sandwich. Every step must be precise enough that a robot — who knows nothing about sandwiches — could follow it exactly. A robot cannot "assume" anything.

Example of an imprecise step: "Put peanut butter on the bread." (Which bread? How much? With what? Which side?)
Example of a precise step: "Using a butter knife, scoop 2 tablespoons of peanut butter from the jar. Spread it on one side of one slice of bread, covering the entire surface."

Total number of steps written: _______

Exchange with a partner: read their algorithm exactly as written. Did it produce a correct sandwich? What step was missing or imprecise? _______________________________________________

Part 2 — Debug the Algorithm

Find the bug(s) in this algorithm. There is at least one step that is wrong, missing, or in the wrong order:

// Algorithm: Save a document
1. Open the file
2. Edit the text
3. Close the computer
4. The file is saved

Bug(s) found: _______________________________________________

Corrected algorithm (rewrite it with the bug fixed):

Part 3 — Loops

A loop repeats steps a set number of times. Write a loop algorithm for watering 5 plants:

REPEAT 5 times:
   Step 1: _______________________________________________
   Step 2: _______________________________________________
   Step 3: _______________________________________________
END REPEAT

How many total steps does the computer execute if it repeats 3 steps 5 times? _______ steps

Why is a loop more efficient than writing out all 15 steps separately? _______________________________________________

Part 4 — Conditionals: If-Then-Else

A conditional runs different steps depending on whether a condition is true. Complete the flowchart and the code:

Scenario: A school checks whether a scholar has completed their homework before allowing free reading time.

IF homework_complete == TRUE:
   THEN: _______________________________________________
ELSE:
   THEN: _______________________________________________
Draw the flowchart here: diamond shape for the decision, rectangles for each outcome, arrows showing the flow
Part 5 — Decomposition: Breaking a Problem Down

Computational thinking starts by breaking a large problem into smaller, solvable parts. Break down the problem "Plan a community potluck dinner for 20 families" into 4 sub-problems. Each sub-problem should be specific enough to solve:

Sub-problem 1: _______________________________________________

Sub-problem 2: _______________________________________________

Sub-problem 3: _______________________________________________

Sub-problem 4: _______________________________________________

Aurora Pause — Grades 4-6

Dorothy Vaughan managed a group of Black women mathematicians at NACA (later NASA) in the 1950s. When she learned that electronic computers would replace human computers, she taught herself FORTRAN and trained her entire team so they would not lose their jobs. She wrote algorithms that were used in the first American orbital spaceflight. Name one decision she made that was algorithmic thinking — that is, one decision where she identified a problem, planned a sequence of steps, and executed them in order. Explain the connection between her story and what you practiced today:


Grade Band: 7-9 — Functions, Data Structures, Pattern Recognition, and Pseudocode

Grades 7-9
Key vocabulary for this band:
Function/Procedure: a named block of code that performs a specific task and can be called repeatedly
Parameter: an input value that a function receives
Return value: the output a function produces
Array/List: an ordered collection of values stored under one name
Index: the position number of an item in a list (most languages start at 0)
Pattern recognition: identifying a repeating structure in a problem so the same solution can be applied
Part 1 — Functions: Reusable Algorithms

A function lets you write code once and use it many times. Read this function and answer the questions:

FUNCTION calculate_savings(weekly_income, weekly_expenses):
   savings = weekly_income - weekly_expenses
   RETURN savings

result1 = calculate_savings(150, 90)
result2 = calculate_savings(200, 175)
result3 = calculate_savings(85, 85)

What does result1 equal? _______ result2? _______ result3? _______

What are the parameters of this function? _______________________________________________

Write a new function called calculate_annual_savings that takes weekly_savings as a parameter and returns the annual total (multiply by 52):

FUNCTION calculate_annual_savings(_________________):
   annual = _________________________
   RETURN _________________________
Part 2 — Lists and Iteration

A list stores multiple values under one name. Access each item by its index number, starting at 0.

scholars = ["Amara", "Kofi", "Zara", "Marcus", "Imani"]

// scholars[0] = "Amara"
// scholars[2] = ???

scholars[2] = _______    scholars[4] = _______    How many items in this list? _______

Write a loop that prints every name in the list:

FOR EACH name IN scholars:
   PRINT _______________________________________________

How many times does the loop body execute? _______

Part 3 — Pattern Recognition and Abstraction

Pattern recognition: all of these problems share the same structure. Identify the pattern and write ONE function that solves all of them.

Problem set: "A co-op has 6 members. Each contributes $40. Total = ?"
"A class has 18 scholars. Each brings 2 books. Total books = ?"
"A family buys 4 bags of rice. Each bag has 10 pounds. Total pounds = ?"

The pattern in all three: _______________________________________________

FUNCTION _______________(count, amount_each):
   RETURN _______________________________________________

Verify: call your function with the three problem sets above and confirm each answer:

Function call 1: _______________ = _______    Check: _______

Function call 2: _______________ = _______    Check: _______

Function call 3: _______________ = _______    Check: _______

Part 4 — Nested Conditionals

A grading program gives letter grades based on score. Complete the nested conditional:

FUNCTION assign_grade(score):
   IF score >= 90:
      RETURN "A"
   ELSE IF score >= 80:
      RETURN _______________
   ELSE IF score >= ___:
      RETURN _______________
   ELSE IF score >= ___:
      RETURN _______________
   ELSE:
      RETURN _______________

assign_grade(93) returns: _______    assign_grade(74) returns: _______    assign_grade(58) returns: _______

Aurora Pause — Grades 7-9

Algorithmic bias is documented: when algorithms are trained on biased data, they produce biased results. A 2016 ProPublica investigation (documented, publicly available) found that a criminal justice algorithm called COMPAS rated Black defendants as "high risk" of reoffending at nearly twice the rate as white defendants with identical records. Name one specific way that the algorithms you wrote today could become biased if the input data were skewed. What responsibility does a programmer have to check for bias in their own code?


Grade Band: 10-12 — Complexity, Data Analysis, Ethical Computing, and Systems Design

Grades 10-12
Key vocabulary for this band:
Time complexity: how the running time of an algorithm grows as input size grows (O(n) = linear, O(n²) = quadratic)
Data structure: a way of organizing data for efficient access (arrays, hash tables, trees, graphs)
API: Application Programming Interface — a documented contract for how software components communicate
Machine learning: algorithms that improve their output by training on data, rather than following explicit rules
Ethical computing: the responsibility of programmers to consider the impact of their algorithms on real people
Part 1 — Algorithm Complexity: Comparing Approaches

Two approaches to find the largest number in a list of n numbers:

// Approach A — Linear search: O(n)
FUNCTION find_max_A(numbers):
   max = numbers[0]
   FOR i FROM 1 TO length(numbers)-1:
      IF numbers[i] > max:
         max = numbers[i]
   RETURN max

// Approach B — Already sorted list: O(1)
FUNCTION find_max_B(sorted_numbers):
   RETURN sorted_numbers[length(sorted_numbers)-1]

If the list has 1,000,000 numbers, how many comparisons does Approach A make in the worst case? _______

How many does Approach B make? _______ What is the tradeoff — what does Approach B require that Approach A does not? _______________________________________________

In what real-world situation would Approach A be better despite being slower? _______________________________________________

Part 2 — Data Analysis: Working with a Dataset

The following dataset represents test scores for 10 scholars: [88, 72, 95, 61, 84, 90, 77, 88, 69, 83]

Write pseudocode or calculations to answer each question:

Mean (average): Sum = _______    Count = _______    Mean = _______

Median: Sort the list first: _______________________________________
The two middle values are _______ and _______. Median = _______

Mode: Which score appears most often? _______ How many times? _______

Range: Max = _______    Min = _______    Range = _______

Write a function that takes a list and returns all three: mean, median, and mode:

Part 3 — Systems Design: Specify Before You Build

Design (not build) a simple community library management system. Before writing any code, a software engineer writes specifications. Complete the specification document:

Specification ElementYour Design
What data does the system store? (list at least 4 data types)
What can a user DO in this system? (list at least 5 actions)
What data structure would you use to store books, and why?
What happens when a book is checked out? (describe the state change)
What is one edge case — an unusual situation the system must handle?
What is one security concern and how would you address it?
Part 4 — Ethical Computing Analysis

Read this scenario: A city government uses a predictive policing algorithm that analyzes historical crime data to direct police patrols to certain neighborhoods. The algorithm was trained on 20 years of arrest data.

Identify the data input: _______________________________________________

What bias might already exist in the training data? _______________________________________________

What is the feedback loop — how might the algorithm's outputs affect future data, creating a self-reinforcing cycle? _______________________________________________

Who is harmed if the algorithm is biased? Who is benefited? _______________________________________________

As the programmer, what documented steps could you take before deploying this algorithm? _______________________________________________

Aurora Pause — Grades 10-12

Mark Dean holds three of IBM's original nine PC patents and led the team that created the first gigahertz chip processor. He was awarded the status of IBM Fellow — the highest honor at IBM. Philip Emeagwali designed an algorithm in 1989 that used 65,000 processors working in parallel to perform 3.1 billion calculations per second — a world record that contributed to the development of the modern internet. Research one of these two engineers using documented sources. Write a paragraph: what specific algorithmic or systems design problem did they solve, what made their approach innovative, and what connection does their documented work have to the computational thinking skills you practiced today?