1
ENGR 102 Exam 2 Questions with Correct
Answers | Updated (100% Correct Answers)
We'll use top-down design as a way of organizing many of our
programs. Which of the following steps is included in the top-down
design process?
A. Break the problem into individual "large" steps
B. Break individual "large" steps into smaller steps
C. Stop the design process when the code should be "obvious" from
the description Answer: A,B,C
A hierarchy helps manage complexity. Answer: True
Top-down design refers to taking a problem and creating a
hierarchy by breaking it down from the top-most level of the
hierarchy downward. Answer: True
You can use the top-down design method to approach many
problems, including engineering challenges. Answer: True
Example: University -> Academic/Non-Academic -> Colleges/Offices
-> Departments -> Individuals
Question to answer (T/F): When we encounter a hierarchy like this in
computing, we usually call it a "Branch". Answer: False
© 2025 All rights reserved
,2
A hierarchical tree structure will have a "root" at the base. Answer:
True
In a hierarchical tree structure, any one "leaf" node will have a
"parent" (the node just above). Answer: True
In a hierarchical tree structure, any one "leaf" node will have
"children" (the nodes that descend from it, below). Answer: False
In a hierarchical tree structure, the nodes without children are called
"roots". Answer: False
The following are some of the advantages of Hierarchies:
- They can create artificial boundaries
- Can lead to too much conceptual separation between things that
are similar Answer: False
In a hierarchy, a node without children is called a "seed" Answer:
False
In computing, a hierarchy is often called a "tree" Answer: True
In a hierarchy, the "root" node has no parents and many children
Answer: True
Hierarchies help us manage and organize complex things Answer:
True
© 2025 All rights reserved
, 3
Top-down design should usually be my first way of approaching a
programming problem Answer: True
It is common practice to list all functions near the beginning of a
program, before any of the "main" code. Answer: True
print_messages()
def print_messages():
print("Message 1")
print("Message 2") Answer: False
You can call one function from another. Answer: True
When the interpreter encounters a function definition, it
"remembers" what the name of the function is and how many
parameters it takes. It does not actually go through the function
body. Answer: True
The scope of a variable refers to the regions of the program where
that variable is valid, and can be accessed. Answer: True
A local variable is a variable defined in the context of just a
particular function. Answer: True
Local variables are shared between functions. Answer: False
def my_function():
© 2025 All rights reserved
ENGR 102 Exam 2 Questions with Correct
Answers | Updated (100% Correct Answers)
We'll use top-down design as a way of organizing many of our
programs. Which of the following steps is included in the top-down
design process?
A. Break the problem into individual "large" steps
B. Break individual "large" steps into smaller steps
C. Stop the design process when the code should be "obvious" from
the description Answer: A,B,C
A hierarchy helps manage complexity. Answer: True
Top-down design refers to taking a problem and creating a
hierarchy by breaking it down from the top-most level of the
hierarchy downward. Answer: True
You can use the top-down design method to approach many
problems, including engineering challenges. Answer: True
Example: University -> Academic/Non-Academic -> Colleges/Offices
-> Departments -> Individuals
Question to answer (T/F): When we encounter a hierarchy like this in
computing, we usually call it a "Branch". Answer: False
© 2025 All rights reserved
,2
A hierarchical tree structure will have a "root" at the base. Answer:
True
In a hierarchical tree structure, any one "leaf" node will have a
"parent" (the node just above). Answer: True
In a hierarchical tree structure, any one "leaf" node will have
"children" (the nodes that descend from it, below). Answer: False
In a hierarchical tree structure, the nodes without children are called
"roots". Answer: False
The following are some of the advantages of Hierarchies:
- They can create artificial boundaries
- Can lead to too much conceptual separation between things that
are similar Answer: False
In a hierarchy, a node without children is called a "seed" Answer:
False
In computing, a hierarchy is often called a "tree" Answer: True
In a hierarchy, the "root" node has no parents and many children
Answer: True
Hierarchies help us manage and organize complex things Answer:
True
© 2025 All rights reserved
, 3
Top-down design should usually be my first way of approaching a
programming problem Answer: True
It is common practice to list all functions near the beginning of a
program, before any of the "main" code. Answer: True
print_messages()
def print_messages():
print("Message 1")
print("Message 2") Answer: False
You can call one function from another. Answer: True
When the interpreter encounters a function definition, it
"remembers" what the name of the function is and how many
parameters it takes. It does not actually go through the function
body. Answer: True
The scope of a variable refers to the regions of the program where
that variable is valid, and can be accessed. Answer: True
A local variable is a variable defined in the context of just a
particular function. Answer: True
Local variables are shared between functions. Answer: False
def my_function():
© 2025 All rights reserved