Table of Contents
Vocab
Abstraction
The most fundamental idea in computer science, giving a name to something in a program to make it more readable.
Procedural abstraction
Using a procedure to name an idea, ex. the procedure "who" to the idea of picking an item from the list of people or cats.
Parameter vs. Argument
parameter (or formal parameter) is the input name, such as number of branches. The input name is set in the block definition. It never changes.
An argument (or actual argument) is the input value, such as 6 for a hexagonal pinwheel. The input value is given each time the block is run; it can be a different value each time.
We use the word "input" both for parameters (input names) and for arguments (input values).
Micro Computer
A micro-computer is a small but powerful computer system.
Breakout Board
A Breakout Board allows a micro-computer to be easily connected to various electronic input and output devices.
Lists, Strings, and Concatenation
A list is an ordered sequence of items. You've seen this File:
The items of this list are strings. A string is a sequence of characters (letters, digits, punctuation, etc.). A substring is just a piece of some existing string. For example, "Hanna," "anna", and "nnah" are each substrings of the string "Hannah." (The empty string as well as the original string are both also substrings.)
To concatenate strings means to make a bigger string by connecting two or more smaller strings. In Snap!, the
block lets you concatenate strings.
Computer Control
When a computer is connected to a series of systems and devices in the real world, and a computer program is used to control the various devices, it is often known as a Computer Control system.
Digital Device
A Digital device processes information using electronic signals that are either 0 (off) or 1 (on).
Personally identifiable information (PII)
Is information that can let others figure out who you are and possibly get more information like your Social Security number, age, race, phone number(s), medical information, financial information, or biometric data (such as your thumbprint or face scan).
Data
Data is the term used to describe the information used and stored in a computer. It comprises information stored using digital information (0’s and 1’s).
Iteration
Computer scientists describe a repeating program structure as looping, repetition, or iteration.
The code can be repeated forever, a specific number of times (such as when using repeat), or until something specific happens (such as when using repeat until as you'll see in Lab 5).
Algorithm and Pseudocode
An algorithm is a sequence of steps that are usually performed by a computer. The algorithm doesn't have to be written in any particular programming language or even in a programming language at all; you can write your algorithm in English or any other human language. Some people call an algorithm written in human language pseudocode. Once you know the steps that the computer will take, you can code your algorithm in the programming language of your choice. What's the purpose of "pseudocode"? Why write an algorithm vaguely in English when you could write it precisely in Snap!? If you were programming in a punctuation-heavy language, designing your program in pseudocode would help you focus on the important ideas instead of on details like quotation marks and semicolons. But pseudocode isn't as necessary with a language like Snap!, and pseudocode can make it easy for you to fall into wishful thinking about what the computer is capable of (such as writing "Pick tomorrow's winning lottery numbers" or "Here's the melody; write the harmony").
Procedures, Reporters, and Commands
A procedure is a named sequence of instructions that may take inputs and may report a value. Some languages call procedures methods or functions. Here are two types of procedures you have seen in Snap!
Reporters have an oval shape. They report a value.
Commands have a jigsaw puzzle shape. They tell the computer to do something without reporting a value.
Expressions and Values
An expression is a either a constant value (such as "4" or "winter") or a call to a reporter block including its inputs (such as
, or
).
Expressions are evaluated to produce a single value (a value can be a number, a string, a sprite, a costume, a script, a list—anything). For example,
will be evaluated to 17.
Infinite Loop
When a program keeps running forever, that's called an infinite loop.
</details>
Code Segment
A code segment is a sequence of connected instructions that carry out a purposeful action, such as the one pictured on the left, which animates a conversation. The instructions in the code segment are carried out in order, from top to bottom.
Sequencing
Statements execute in the order they appear unless the flow of control changes. Example: ROTATE_LEFT() followed by MOVE_FORWARD().
Selection
Uses a condition to determine which part of an algorithm is executed. Example: IF (x < 3)
Variable
A named value that can change while a program runs. Example: i in i ← 3
Assignment
Stores a value in a variable. Example: i ← 3
Condition
An expression that evaluates to either true or false. Example: x < 3
Boolean
A value that is either true or false. Example: the result of x ≤ 1
Relational Operator
Compares two values and produces a Boolean result. The operators are < > ≤ ≥ = ≠
Procedure Call
Tells the program to execute a procedure. Example: FancyMove(i)
Flow of Control
The order in which statements in a program are executed. Example: an IF determines which branch runs.
Nested Selection
A selection statement contained inside another selection statement. Example: an IF inside an ELSE block.
Nested Iteration
An iteration statement contained inside another iteration statement. Example: REPEAT i TIMES inside REPEAT 3 TIMES
Important Blocks
Broadcast
Sends a message to all the sprites. To set the message, click the down arrow and select "new..."
When I Receive
(Click help on the block to learned more about it in order to complete this definition)
On the AP Exam

- Many languages (and the AP CS Principles Exam) use return instead of report as the name of the command to give a value back at the end of a function call.
- The exam uses “value of a procedure” to mean the value the procedure returns when called. For example, “the value of double(5)” means 10.
There is nothing exactly like
or
on the AP Exam because they don’t have sprites and speech balloons, but their way of showing this text to the user is DISPLAY(gossip()) if it’s written as text or a white rounded rectangle containing first the word ‘DISPLAY’ in all caps and then a smaller white rectangle containing the word ‘gossip’ in lower case if it’s shown as blocks.
You won’t have to be able to write code in this notation on the AP exam. You just have to be able to read it so you can answer questions about it.
The expression
would be written as RANDOM(1, 10) or RANDOM(1, 10). Every time you run this code, you will get a different random number between 1 and 10.
The procedure definition for the custom pinwheel command
would be written as
PROCEDURE pinwheel(numberOfBranches)
{
REPEAT numberOfBranches TIMES
{
move(100)
move(-37)
turn_clockwise(360 / numberOfBranches)
}
}
or
The procedures move() and turn_clockwise() aren’t built in to the AP’s language so they are written in lower case like other programmer-defined procedures.
Notice that the hat block,
would be written as PROCEDURE pinwheel(numberOfBranches). The word PROCEDURE tells you that that line of the code is like a hat block; the variable name in the parentheses on that line is the input that the procedure takes.
This instruction
would be written as Pinwheel(6, 80, 20) or a white rounded rectangle containing first the word ‘PINWHEEL’ in all caps and then a smaller white rectangle containing the inputs ‘6, 80, 20’.
You may hear people use the term “pseudocode” to refer to this pseudo-language used on the AP CS Principles exam, but it’s not pseudocode. Pseudocode isn’t a programming language at all, it’s the use of normal human language to describe an algorithm.
The script
would be written as REPEAT UNTIL(mouseY() < 0)
{
DISPLAY(numFish)
}
or
The language used on the AP Exam doesn’t allow spaces in names of inputs (such as number of fish) or in programmer-defined procedures (such as mouse y, which isn’t built into their language). So this example translates them to numFish and MouseY().
The reason for the () or box after MouseY is that MouseY() is a procedure call even though it doesn’t take any inputs.
Remember, you don’t need to learn to write the made-up language used on the AP exam. You just have to be able to read and answer questions about it.
Markdown Style Guide for Coding Notebooks
Follow this guide to keep your coding notebook clear, consistent, and professional.
This ensures your notes are easy for you (and others) to read later.
Headings
When to use: Organize your notebook into sections (like days, topics, or projects).
-
# for the notebook title (use once at the top).
-
## for each day or major topic.
-
### for subsections (like “Notes”, “Practice”, “Reflections”).
Example:
My Coding Notebook
Day 1
Notes
Practice
Text Formatting
When to use: Highlight important ideas or add emphasis.
Use bold for key terms or definitions.
Use italic for emphasis or side comments.
Use inline code for keywords, functions, or commands.
Example:
Class = a blueprint for objects
Remember: always test your code
Use System.out.println() to print
Code Blocks
When to use: Anytime you write multiple lines of code.
Inline code for short snippets.
Fenced code blocks with language for full examples.
Example:
public class Hello {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
Lists
When to use: Organize steps, notes, or key points.
Numbered lists for sequences or steps.
Bulleted lists for unordered ideas.
Example:
Define the class
Write the main method
Test your program
Variables
Checklists
When to use: Track progress on assignments or tasks.
Example:
[x] Complete coding warm-up
Blockquotes
When to use: Call out notes, reminders, or teacher comments.
Example:
💡 Remember: Loops repeat code until a condition is false.
Tables
When to use: Compare values, track progress, or organize data neatly.
Example:
| Task |
Status |
Notes |
| Homework 1 |
Done # |
Submitted |
| Homework 2 |
Pending |
Needs review |
Links & Images
When to use: Add references, resources, or visuals.
Example:
Java Docs

To make an image that is a link, paste the image, then add the following before it, replacing website address with the link:
And after the image info, add: </a>
Collapsible Sections
When to use: Hide solutions, extended notes, or extra details.
Example:
Click to reveal solution
System.out.println("Answer: 42");
When to use: Add references or side notes without cluttering the page.
Example:
This concept is related to object-oriented programming.
Style Rules
Consistency matters more than creativity
Always use headings to structure your notes.
Always use code blocks for multi-line code.
Clarity first
Bold key terms.
Use lists instead of long sentences when outlining steps.
Professional tone
Don’t mix casual notes with formal work in the same section.
Use blockquotes for reflections or teacher feedback.
Track your learning
Use checklists to mark what’s done.
Use collapsible sections if you want to hide answers until review time.
Bottom Line:
Headings = Structure
Bold/Italic = Emphasis
Code blocks = Code
Lists = Steps/Ideas
Tables = Organization
Checklists = Progress
Blockquotes = Notes/Tips
Collapsible = Hide/Show detail