Unit 1: Introduction to Programming

Lab 1: Click Alonzo Game

1.1.4: Sprites and Costumes

The Alonzo character is named after Alonzo Church, a major contributor to early computer science. In this project, there are three objects related to Alonzo:

1.1.4

The transparency of an image is how much you can see what's behind it. For example, here is the Alonzo sprite shown with three different transparencies (which have been set using the ghost effect block).
three pictures of Alonzo, with ghost effect 0%, 25%, and 50%, on a background of a brick wall

Lab 2: Gossip

1.2.3: Lists, Strings, and Concatenation
1.2.3

This process of testing, finding problems, and fixing them is called debugging.

1.2.4: Procedures, Reporters, and Commands
AAP-3.A.1, AAP-3.A.2

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!:

1.2.5: Expressions and Values
AAP-2.B.3, AAP-2.B.4

Lab 3: Modern Art with Polygons

1.3.1: Algorithm and Pseudocode
AAP-2.A.1, AAP-2.A.2, AAP-2.A.3

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").
1.3.3: What's an input? Parameter vs. Argument
AAP-3.A.3

We use the word "input" both for parameters (input names) and for arguments (input values).

1.3.6: Iteration
AAP-2.J.1

Computer scientists describe a repeating program structure as looping, repetition, or iteration.

AAP-2.K.1

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).
repeat (4) (move (100), turn clockwise (90)) repeat until (touching (Leader)?)
{
    point towards (Leader)
    move (1) steps
}

Lab 4: Protecting Your Privacy

1.4.1
IOC-2.A.1

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).

Lab 5: Follow the Leader

1.5.2

When a program keeps running forever, that's called an infinite loop.

1.5.2
CRD-2.B.2, AAP-2.B.2, AAP-2.B.6

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.