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

CSP Exam Review 2024 Rated 100% Correct!!

Rating
-
Sold
-
Pages
21
Grade
A+
Uploaded on
06-11-2024
Written in
2024/2025

CSP Exam Review 2024 Rated 100% Correct!!

Institution
....
Course
....

Content preview

Name: Score:


27 Multiple choice questions

Term 1 of 27
A new bank plans to make customer convenience a priority by minimizing the amount of time a
customer waits in line. The bank is considering two options: a single line where the customer at
the front waits for the next available teller, or separate lines for each teller. The bank decides to
use a computer simulation of these two options to determine the average wait time for customers.


Which of the following is NOT true about the bank's plan?

The procedure returns true when the initial value of number is even, and it otherwise
returns false.

Algorithm ii always works correctly, but algorithm i only works correctly when the maximum
value is greater than or equal to -1.

The simulation will not produce usable results because actual customer data are not
available.

The program correctly displays the count of even numbers between 1 and number.

,Term 2 of 27
r←1
s←2
t←3
r←s
s←t
DISPLAY (r)
DISPLAY (s)


What is displayed as a result of running he code segment?

34

13


12

23

, Term 3 of 27
Programs I and II below are each intended to calculate the sum of the integers from 1 to n.
Assume that n is a positive integer.


Program I:
i←1
result ← 0
REPEAT n TIMES
result ← result + i
i←i+1
DISPLAY result


Program II:
i←n
result ← 0
REPEAT n TIMES
result ← result + i
i←i-1
DISPLAY result


Which of the following best describes the behavior of the two programs?

Program 1 displays the correct average, but Program 2 doesn't.


NOT vaultClosed OR (heardNoise OR sawMovement)

The program could display either true or false.

Both Program I and Program II display the correct sum.

Written for

Institution
....
Course
....

Document information

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

Subjects

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.
amzingnurse study smarts
View profile
Follow You need to be logged in order to follow users or courses
Sold
1555
Member since
1 year
Number of followers
62
Documents
3634
Last sold
4 days ago

4.8

1567 reviews

5
1344
4
184
3
14
2
6
1
19

Trending documents

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 exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT 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