Create Task Resources

Author

Ms. O’Keefe and Mr. Chang

Link to the Collegeboard website about the AP Exam

Requirements

Run-time errors

There are two main categories of run-time errors that we can observe: Snap! errors and Logic errors.

Snap! errors

These are errors that Snap! knows about and will let the user know about. So in other words, when you have code that Snap! stops running because it knows that it has encountered something wrong (the code gets highlighted in red)

Here are a few examples:

Logic errors

These are errors that Snap! doesn’t know about! Snap! will run code that it think runs right, but the program isn’t behaving the way that you want.

Examples:

Vocabulary

Algorithm
An algorithm is a finite set of instructions that accomplish a specific task. Every algorithm can be constructed using combinations of sequencing, selection, and iteration.
Arguments
The values of the parameters when a procedure is called. Collection type: Aggregates elements in a single structure. Some examples include: databases, hash tables, dictionaries, sets, or any other type that aggregates elements in a single structure.
Data stored in a list
Input into the list can be through an initialization or through some computation on other variables or list elements.
Input
Program input is data that are sent to a computer for processing by a program. Input can come in a variety of forms, such as tactile (through touch), audible, visual, or text. An event is associated with an action and supplies input data to a program.
Iteration
Iteration is a repetitive portion of an algorithm. Iteration repeats until a given condition is met or for a specified number of times. The use of recursion is a form of iteration.
List
A list is an ordered sequence of elements. The use of lists allows multiple related items to be represented using a single variable. Lists are referred to by different terms, such as arrays or arraylists, depending on the programming language.
List being used
Using a list means the program is creating new data from existing data or accessing multiple elements in the list.
Output
Program output is any data that is sent from a program to a device. Program output can come in a variety of forms, such as tactile, audible, visual, movement, or text.
Parameter
A parameter is an input variable of a procedure. Explicit parameters are defined in the procedure header. Implicit parameters are those that are assigned in anticipation of a call to the procedure. For example, an implicit parameter can be set through interaction with a graphical user interface.
Procedure
A procedure is a named group of programming instructions that may have parameters and return values. Procedures are referred to by different names, such as method, function, or constructor, depending on the programming language.
Program code segment
A code segment refers to a collection of program statements that are part of a program. For text-based programming, the collection of program statements should be continuous and within the same procedure. For block-based programming, the collection of program statements should be contained in the same starter block or what is referred to as a “Hat” block.
Program functionality
The behavior of a program during execution, often described by how a user interacts with it.
Purpose
The problem being solved or creative interest being pursued through the program.
Selection
Selection determines which parts of an algorithm are executed based on a condition being true or false. The use of try / exception statements is a form of selection statements.
Sequencing
The application of each step of an algorithm in the order in which the code statements are given.
Student-developed procedure / algorithm
Program code that is student-developed has been written (individually or collaboratively) by the student who submitted the response. Calls to existing program code or libraries can be included but are not considered student-developed. Event handlers are built-in abstractions in some languages and will, therefore, not be considered student-developed. In some block-based programming languages, event handlers begin with “when.”