D278 WGU SCRIPTING AND PROGRAMMING
FOUNDATIONS EXAM| ACTUAL EXAM WITH
OVER 170 QUESTIONS WITH 100% VERIFIED
CORRECT ANSWERS ALREADY GRADED A+|
BRAND NEW!!!
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) - 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
,2|Pag e
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
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
, 3|Pag e
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
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