Variables and Assignments
Data Types
Variable Scope
Abstraction
Algorithm Development
100

What is a variable?

A named storage location in memory that holds a value

100

What is a data type?

A classification that specifies what kind of value a variable can hold

100

What is local scope?

The region within a program where a variable is accessible only within the function or block where it is declared.

100

What is abstraction?

The process of reducing complexity by focusing on the main idea and hiding irrelevant details.

100

Why are variables important in algorithms?

They store data that can change, allowing algorithms to perform dynamic operations.

200

How do you assign a value to a variable in pseudocode?  

The syntax SET x TO 10 assigns the value 10 to the variable x in pseudocode

200

Name two common data types.

Examples include integer and string

200

What is global scope?

Variables that are accessible from any part of the program

200

How do variables support abstraction?

They allow for generalization by using names that can represent different values at different times.  

200

How do you declare a variable in pseudocode?

The syntax SET x TO 0 declares a variable x in pseudocode.

300

What does it mean to initialize a variable?

Giving a variable an initial value when it is declared

300

What is a Boolean value?

A data type that represents two possible values: true or false

300

What is a parameter in a function?

A variable defined in a function’s declaration to accept input values

300

What is an abstract data type?

A model or concept that represents complex data structures or operations in a simplified manner

300

How do variables enhance algorithm efficiency?

Variables allow algorithms to operate on changing data, making them more versatile and efficient.

400

How can a variable's value be updated?

Changing the value of a variable to a new value

400

Give an example of a string

"Hello, World!" is an example

400

What is block scope?

Variables declared inside a set of curly braces {} or within any block of code

400

How do constants support abstraction?

Constants provide meaningful names for fixed values, making programs easier to understand.

 

400

What is the role of a loop control variable?

It is used to control the number of iterations in a loop, ensuring the algorithm runs correctly.

500

What is a variable identifier?

The name given to a variable that follows naming rules and conventions.

500

How do you convert data types in pseudocode?

Using functions like TO_INTEGER or TO_STRING in pseudocode

500

What is the scope of a variable declared inside a function?

The scope is limited to the function itself

500

Give an example of using abstraction in problem-solving

Using functions and variables to simplify a complex problem, such as breaking down a program into smaller, manageable pieces.

500

How do variables support algorithm debugging?

They can be used to track the state and flow of an algorithm, helping identify where errors occur.

M
e
n
u