Answers 2026 Update 100% Correct updated
What is the loop variable initialization in the following pseudocode?
y = 0 s = 100.0 while y < 10 s = s + (s * 5.0) y = y + 1
Ay=0
By=y+1
C s = 100.0
D s = s + ( s * 5.0)
1
Smart Study HQ
, - ANSWER: A
Order the steps needed to output the minimum of x and y from first (1) to last (4).
Select your answers from the pull-down list.
A Declare variable min
B Put min to output
C min = x
D If y < min, set min = y
- ANSWER: ACDB
Order the steps needed to calculate speed in miles per hour given a start and end
location and time traveled in hours from first (1) to last (4).
Select your answers from the pull-down list. A
Put speedMph to output
B Declare variables distMiles and speedMph
C distMiles = endLocation – startLocation
D speedMph = distMiles / timeHours
- ANSWER: BCDA
2
Smart Study HQ
, Order the tasks needed to create a pyramid (large on bottom, small on top) on a
table from first (1) to last (4).
Select your answers from the pull-down list.
A Place largest shape.
B Clear table.
C Place smallest shape.
D Place middle-sized shape.
- ANSWER: BADC
What does the following algorithm determine? if x == y
z = 1 else z = 0
A Whether x and y are the same
B Whether x and y are negative
C Whether x is 1
D Whether x is 0
- ANSWER: A
What does the following algorithm accomplish?
x = Get next input if x == -1
Put "Goodbye" to output
A Outputs -1 when user types any input
B Outputs "x" when user types -1
C Outputs -1 when x is positive
3
Smart Study HQ
, D Outputs Goodbye when user types -1
- ANSWER: D
What does an output of 1 indicate for the following algorithm running on a five-
element list of integers?
i = 0 x = 0 while
i<5
if list[i] < 0 x = 1 i
=i+1
Put x to output
A All integers are positive.
B All integers are negative.
C At least one integer is negative.
D At least one integer is positive.
- ANSWER: C
When should a programmer develop an algorithm to solve a problem?
A Before knowing the problem.
B Before writing a program to solve the problem.
C While writing a program to solve the problem. D After writing a program to
solve the problem .
- ANSWER: B
Which text represents an algorithm?
4
Smart Study HQ