100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Exam (elaborations)

Programming Logic and Design Chapter 3 Review Questions Complete Answers

Rating
-
Sold
-
Pages
6
Grade
A+
Uploaded on
22-03-2025
Written in
2024/2025

Programming Logic and Design Chapter 3 Review Questions Complete Answers

Institution
Programming Logic And Design
Course
Programming Logic and Design









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Programming Logic and Design
Course
Programming Logic and Design

Document information

Uploaded on
March 22, 2025
Number of pages
6
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

Programming Logic and Design
Chapter 3 Review Questions Complete
Answers

Which of the lettered choices is equivalent to the following decision?

if x > 10 then
if y > 10 then
print "X"
endif
endif

a. if x > 10 AND y > 10 then print "X"
b. if x > 10 OR y > 10 then print "X"
c. if x > 10 AND x > y then print "X"
d.if y > x then print "X" - ANSWER-if x > 10 then

The Acme Computer Company operates in all 50 of the United States. The Midwest
Sales region consists of five states--Illinois, Indiana, Iowa, Missouri, and Wisconsin.
Suppose that you have input records containing Acme customer data, including state
of residence. To most efficiently select and display all customers who live in the
Midwest Sales region, you would use ___________.

a. five completely separate unnested if statements
b. nested if statements using AND logic
c. nested if statements using OR logic
d.Not enough information is given. - ANSWER-c. nested if statements using OR logic

The Midwest Sales region of Acme Computer Company consists of five states—
Illinois, Indiana, Iowa, Missouri, and Wisconsin. About 50 percent of the regional
customers reside in Illinois, 20 percent in Indiana, and 10 percent in each of the
other three states. Suppose you have input records containing Acme customer data,
including state of residence. To most efficiently select and display all customers who
live in the Midwest Sales region, you would ask first about residency in
_____________.

a. Illinois
b. Indiana
c. Either Iowa, Missouri, or Wisconsin--It does not matter which one of these three
are first
d. Any of the five states; it does not matter which one is first - ANSWER-a. Illinois

The Boffo Balloon Company makes helium balloons. Large balloons cost $13 a
dozen, medium-sized balloons cost $11 a dozen, and small balloons cost $8.60 a
dozen. About 60 percent of the company's sales are the smallest balloons, 30

, percent are the medium, and large balloons constitute only 10 percent of sales.
Customer order records include customer information, quantity ordered, and size.
When you write a program to determine price based on size, for the most efficient
decision, you should ask first whether the size is _____________.

a. large
b. medium
c. small
d. It does not matter. - ANSWER-c. small

The Boffo Balloon Company makes helium balloons in three sizes, 12 colors, and
with a choice of 40 imprinted sayings. As a promotion, the company is offering a 25
percent discount on orders of large, red "Happy Valentine's Day" balloons. To most
efficiently select the orders to which a discount applies, you would use
_____________.

a. three completely separate unnested if statements
b. nested if statements using AND logic
c. nested if statements using OR logic
d. Not enough information is given. - ANSWER-b. nested if statements using AND
logic

Radio station FM-99 keeps a record of every song played on the air in a week. Each
record contains the day, hour, and minute the song started, and the title and artist of
the song. The station manager wants a list of every title played during the important
8 a.m. commute hour on the two busiest traffic days, Monday and Friday. Which
logic would select the correct titles?

a. if day = "Monday" OR day = "Friday" OR hour = 8 then
print title
endif

b. if day = "Monday" then
if hour = 8 then
print title
else
if day = "Friday" then
print title
endif
endif
endif

c. if hour = 8 AND day = "Monday" OR day = "Friday" then
print title
endif

d. if hour = 8 then
if day = "Monday" OR day = "Friday" then
print title
endif

Get to know the seller

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.
lectknancy Boston University
View profile
Follow You need to be logged in order to follow users or courses
Sold
285
Member since
2 year
Number of followers
28
Documents
26010
Last sold
1 week ago

3.6

57 reviews

5
23
4
10
3
11
2
3
1
10

Recently viewed by you

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

Frequently asked questions