CSP EXAM QUESTIONS AND CORRECT
DETAILED ANSWERS (VERIFIED
ANSWERS); ALREADY GRADED A+
A biologist wrote a program to simulate the population of
a sample of bacteria. The program uses the following
procedures.
Procedure CallExplanationInitialPopulation ()Returns the
number of bacteria at the start of the
simulationNextPopulation (currPop)Based on the current
value of currPop, returns the number of bacteria after one
hour
Code for the simulation is shown below.
hours ←← 0
startPop ←← InitialPopulation ()
currentPop ←← startPop
REPEAT UNTIL ((hours ≥ 24) OR (currentPop ≤ 0))
{
currentPop ←← NextPopulation (currentPop)
hours ←← hours + 1
}
,DISPLAY (currentPop - startPop)
Which of the following are true statements about the
simulation?
The simulation continues until either 24 hours pass or the
population reaches 0.
The simulation displays the average change in population
per hour over the course of the simulation.
The simulation displays the total population at the end of
the simula - correct answer- A
I only
A bookstore has a database containing information about
each book for sale in the store. A sample portion of the
database is shown below.
AuthorTitleSelling PriceGenreQuantity AvailableJ. M.
BarriePeter and Wendy$6.99Fantasy3L. Frank BaumThe
Wonderful Wizard of Oz$7.99Fantasy2Arthur Conan
DoyleThe Hound of the Baskervilles$7.49Mystery4Mary
ShelleyFrankenstein$7.99Horror4Jules VerneTwenty
Thousand Leagues Under the Sea$6.99Science Fiction3H.
G. WellsThe War of the Worlds$4.99Science Fiction3
,A store employee wants to calculate the total amount of
money the store will receive if they sell all of the available
science fiction books. Which columns in the database can
be ignored and still allow the employee to perform this
calculation?
Select two answers.
A
Author
B
Title
C
Genre
D
Quantity Available - correct answer- A
Author
B
Title
, A color in a computing application is represented by an
RGB triplet that describes the amount of red, green, and
blue, respectively, used to create the desired color. A
selection of colors and their corresponding RGB triplets
are shown in the following table. Each value is
represented in decimal (base 10).
Color NameRGB Tripletindigo (75, 0, 130)ivory(255, 255,
240)light pink(255, 182, 193)light yellow(255, 255,
224)magenta(255, 0, 255)neutral gray(127, 127, 112)pale
yellow(255, 255, 160)vivid yellow(255, 255, 14)
According to information in the table, what color is
represented by the binary RGB triplet (11111111,
11111111, 11110000) ?
A
Ivory
B
Light yellow
C
Neutral gray
D
Vivid yellow - correct answer- A
DETAILED ANSWERS (VERIFIED
ANSWERS); ALREADY GRADED A+
A biologist wrote a program to simulate the population of
a sample of bacteria. The program uses the following
procedures.
Procedure CallExplanationInitialPopulation ()Returns the
number of bacteria at the start of the
simulationNextPopulation (currPop)Based on the current
value of currPop, returns the number of bacteria after one
hour
Code for the simulation is shown below.
hours ←← 0
startPop ←← InitialPopulation ()
currentPop ←← startPop
REPEAT UNTIL ((hours ≥ 24) OR (currentPop ≤ 0))
{
currentPop ←← NextPopulation (currentPop)
hours ←← hours + 1
}
,DISPLAY (currentPop - startPop)
Which of the following are true statements about the
simulation?
The simulation continues until either 24 hours pass or the
population reaches 0.
The simulation displays the average change in population
per hour over the course of the simulation.
The simulation displays the total population at the end of
the simula - correct answer- A
I only
A bookstore has a database containing information about
each book for sale in the store. A sample portion of the
database is shown below.
AuthorTitleSelling PriceGenreQuantity AvailableJ. M.
BarriePeter and Wendy$6.99Fantasy3L. Frank BaumThe
Wonderful Wizard of Oz$7.99Fantasy2Arthur Conan
DoyleThe Hound of the Baskervilles$7.49Mystery4Mary
ShelleyFrankenstein$7.99Horror4Jules VerneTwenty
Thousand Leagues Under the Sea$6.99Science Fiction3H.
G. WellsThe War of the Worlds$4.99Science Fiction3
,A store employee wants to calculate the total amount of
money the store will receive if they sell all of the available
science fiction books. Which columns in the database can
be ignored and still allow the employee to perform this
calculation?
Select two answers.
A
Author
B
Title
C
Genre
D
Quantity Available - correct answer- A
Author
B
Title
, A color in a computing application is represented by an
RGB triplet that describes the amount of red, green, and
blue, respectively, used to create the desired color. A
selection of colors and their corresponding RGB triplets
are shown in the following table. Each value is
represented in decimal (base 10).
Color NameRGB Tripletindigo (75, 0, 130)ivory(255, 255,
240)light pink(255, 182, 193)light yellow(255, 255,
224)magenta(255, 0, 255)neutral gray(127, 127, 112)pale
yellow(255, 255, 160)vivid yellow(255, 255, 14)
According to information in the table, what color is
represented by the binary RGB triplet (11111111,
11111111, 11110000) ?
A
Ivory
B
Light yellow
C
Neutral gray
D
Vivid yellow - correct answer- A