Parameters
Retun Values
Libraries
Functions & Abstraction
Surprise!
100

In the function definition calculateArea(length, width), length and width are examples of this type of variable.

What are parameters?

100

This keyword sends a value back from a function to the program.

What is RETURN?

100

A programming library is best described as this.

What is a collection of prewritten code/functions?

100

A named group of instructions that performs a specific task.

What is a function?

100

To stay cool, this legendary Yankee nicknamed "The Bambino" famously wore a cabbage leaf under his cap while playing the outfield.

Who is Babe Ruth?

200

In the function call calculateArea(10, 5), the values 10 and 5 are called this.

What are arguments?

200

What value is returned?


FUNCTION add(a,b)
{
  RETURN a + b
}

add(5,3)


What is 8?

200

While the collection of pre-written procedures helps with code reuse, it is this, often mistaken for the library itself, that acts as the "contract" or documentation defining the procedures, inputs, and expected return values.

What is an API?

200

The practice of hiding complex implementation details behind a function interface is called this.

What is abstraction?

200

This planet is known as the Red Planet.

What is Mars?

300

What will be displayed?


FUNCTION show(x)
{
  DISPLAY(x * 2)
}

show(6)


What is 12?

300

What value will result contain?


FUNCTION triple(x)
{
  RETURN x * 3
}

result ← triple(4)


What is 12?

300

Using a library without understanding its internal code relies on this concept.

What is abstraction?

300

Breaking a program into smaller parts or functions is known as this strategy.

What is modularity?

300

This metal has the chemical symbol Fe.

What is Iron?

400

What will be displayed?


FUNCTION add(a, b)
{
  DISPLAY(a + b)
}

add(3,5)
add(2,7)


What are 8 and 9?

400

What is the final value of value?


FUNCTION square(n)
{
  RETURN n * n
}

value ← square(3) + square(4)


What is 25?

400

Libraries improve reliability because their code has often already been this.

What is tested or debugged?

400

While this technique reduces code redundancy and improves readability, using it excessively or improperly—such as nesting too many, or defining a procedure that relies on global variables—can actually increase this, which is ironically what abstraction is supposed to manage.

What is program complexity?

400

This desert is the largest hot desert in the world.

What is the Sahara Desert?

500

What will be displayed?


FUNCTION mystery(x, y)
{
  DISPLAY(x + y)
}

a ← 3
b ← 4

mystery(a, b)
mystery(b, a + b)


What are 7 and 11?

500

What will be stored in result?


FUNCTION add(a,b)
{
  RETURN a + b
}

FUNCTION square(x)
{
  RETURN x * x
}

result ← square(add(2,3)) + add(4,1)


What is 30?

500

While libraries are designed to increase efficiency and reuse code, this specific type of error often occurs when a library function is imported and used, but the program fails because the imported code directly references global variables that do not exist in the new program’s scope.

What is a run-time error?

500

A programmer writes one function with parameters instead of five separate functions that do nearly the same task. What two major programming benefits does this demonstrate?

What are code reuse and procedural abstraction?

500

Because they have dense, heavy bones, these mammals cannot actually swim, so they perform a slow-motion gallop along the bottom of the riverbed instead.

What are hippos?

M
e
n
u