WGU D278 PRE-ASSESSMENT EXAM SCRIPTING AND
PROGRAMMING FOUNDATIONS LATEST 2024-2025
STUDY GUIDE ALL 180 QUESTIONS AND CORRECT
ANSWERS
Question :What is the loop expression in the following pseudocode?
i=0
while i < 20
Put i to output
i=i+1
Ai
B i<20 />
Ci=0
D i = i + 1 - CORRECT ANSWER✔✔B
1
SUCCESS!
,Page 2 of 36
Question :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) - CORRECT ANSWER✔✔A
Question :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
2
SUCCESS!
,Page 3 of 36
B Put min to output
C min = x
D If y < min, set min = y - CORRECT ANSWER✔✔ACDB
Question :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 - CORRECT ANSWER✔✔BCDA
Question :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.
3
SUCCESS!
, Page 4 of 36
B Clear table
C Place smallest shape.
D Place middle-sized shape. - CORRECT ANSWER✔✔BADC
Question :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 - CORRECT ANSWER✔✔A
Question :What does the following algorithm accomplish?
4
SUCCESS!
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Ressy. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $8.99. You're not tied to anything after your purchase.