Storing Data
Algorithms
Logic and Error Detection
Procedures and Libraries
Efficiency and Limits
100

What is a variable?

A named storage in the memory of a device.

100

What is sequencing and give an example.

It is a step-by-step order in which code runs. An example of sequencing is setting a variable to a specific number and then performing a mathematical operation using the variable, such as adding 5 to it.

100

What are Booleans?

They are a data type that can only have the values of true or false.

100

What is a procedure?

It is reusable blocks of code that perform specific actions, letting the code be more simple.

100

What is algorithm efficiency?

Algorithmic efficiency measures how resource usage (usually time/steps) grows as input size increases.

200

What is data abstraction?

Simplifying data to make it more applicable to more areas.

200

What is selection and give an example.

Selection is conditionals that determine which code should be executed. If/then/else statements are an example of selection.

200

What are conditionals?

They are if/then/else statements.

200

What is procedural abstraction?

Procedural abstraction is using procedures to make the code more simpler. It makes code more simpler because the code segment is being reused.

200

What is an undecidable problem?

A problem for which it is impossible to construct an algorithm that always leads to a correct answer for all possible inputs.

300

What is a string?

It is an ordered sequence of text in quotation marks. The text includes numbers, letters, spaces, and symbols.

300

What is iteration and give an example.

The repetition of specific code that is repeated a specific number of times. Loops are an example of iteration.

300

Name the types of errors.

Syntax, logic/semantic, overflow, and runtime

300

What is a library?

They are a collection of pre-written procedures and tools that can be imported and used in your program.

300

What is heuristic?

It is a good enough solution to a problem when finding the best possible solution would take too long or would be impossible to find.

400

What is a list?

It is an ordered collection of data items stored in one variable. This helps manage complex data and help it be more abstract.

400

What is the bubble sort?

It is a simple sorting algorithm that works by repeatedly stepping through a list, comparing adjacent elements, and switching them if they are in the wrong order.

400

Describe each type of error.

Syntax Error: A mistake in the spelling or grammar of a program that violates the rules of the programming language, preventing it from running.

Logic/Semantic Error: An error in the logic, but doesn't violate any rules. For example, setting the variable to 1 instead of 2.

Runtime Error: A mistake that causes a program to crash or not work unexpectedly while running, even if the code looks like it is syntactically correct. An example is dividing by zero.

Overflow Error: It occurs when a calculation produces a number that is too big to fit within the allocated bits, resulting in data that isn't correct.

400

Give an example of a library.

The blue math blocks in the math drawer in MIT App Inventor are built-in libraries since you just use those blocks in your code, and the program does the math by itself without the user having to know the code to perform mathematical operations.

400

Give an example of an undecidable problem.

The Halting Problem

500

What is an index?

It is a numerical value that represents a specific position of an item in a list.

500

What are the two different types of searches, and what do they do?

The linear search searches through every item in a list until the target item is found. It is good for unsorted data sets. The binary search divides the data set by half each time until the target item is found. It is good for sorted data sets.

500

What are nested conditionals?

Conditionals inside another conditional, which is an if/then/else statement inside another if/then/else statement.

500

How are libraries helpful?

They provide pre-written, tested code that allows programmers to save time.

500

Give an example of a heuristic problem.

Traveling Salesperson Problem