Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 3 out of 23 pages
Exam (elaborations)

ENGR 102 Exam 2 Questions with Correct Answers | Updated (100% Correct Answers)

Document preview thumbnail
Preview 3 out of 23 pages

ENGR 102 Exam 2 Questions with Correct Answers | Updated (100% Correct Answers)

Content preview

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

Document information

Uploaded on
January 16, 2026
Number of pages
23
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$13.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Passit
3.5
(23)
Sold
128
Followers
6
Items
14482
Last sold
2 weeks ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions