• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 22 pages
Exam (elaborations)

D278 (Latest Update 2025 / 2026) Pre-Assessment Scripting and Programming Foundations Questions and 100% Correct Answers– WGU

Document preview thumbnail
Preview 3 out of 22 pages

Identifier - correct answer A name created by a programmer for an item like a variable or function. An identifier must: be a sequence of letters (a-z, A-Z), underscores (_), and digits (0-9), AND start with a letter or underscore. Reserved word or keyword - correct answer A word that is part of the language, like integer, Get, or Put. A programmer cannot use a reserved word as an identifier. Lower camel case - correct answer Abuts multiple words, capitalizing each word except the first, such as numApples. Underscore separated - correct answer Words are lowercase and separated by an underscore, such as num_apples. Expression - correct answer A combination of items, like variables, literals, operators, and parentheses, that evaluates to a value. Example: 2 * (x+1) Literal - correct answer A specific value in code, like 2. Operator - correct answer A symbol that performs a built-in calculation, like the operator + which performs addition. Unary minus - correct answer The subtraction sign (-) used as a negative. Note about integer literal - correct answer Commas are not allowed, so 1,333,555 must be written as 1333555. Incremental development - correct answer The process of writing, compiling, and testing a small amount of code, then writing, compiling, and testing a small amount more (an incremental amount), and so on. Floating-point number - correct answer A real number, like 98.6, 0.0001, or -666.667. Floating-point literal - correct answer A number with a fractional part, even if that fraction is 0, such as 1.0, 0.0, or 99.573.

Content preview

D278 Pre-Assessment Scripting and
Programming Foundations Questions and
100% Correct Answers– WGU


What is the return value of a function?
A Output of a function
B Call to run the function
C Data passed to the function
D Variable in the declaration of the function - correct answer Output of a function


A program should continue accepting input numbers, adding each to a sum, until a 0 is
input.


Which control structure should be used?
A If statement
B For loop
C Multiple if statements
D While loop - correct answer While loop


Joe is building an online game. He wants to provide a riddle and have the player guess
the answer. The game needs to prompt the user to enter the answer, check to see if it
the input provided does not match the correct answer, and continue prompting the
user until the answer entered matches the correct answer.


Which control structure supports Joe's needs?
A For loop
B While loop
C Do-while loop

, D278 Pre-Assessment Scripting and
Programming Foundations Questions and
100% Correct Answers– WGU

D If-else branch - correct answer Do-while loop


What is put to output by the following pseudocode?


x=3
do
Put x to output
Put " " to output
x=x-1
while x > 0
A3210
B 3 2 1 0 -1
C210
D 3 2 1 - correct answer 321


A programmer has developed the following code:


count = 0
while count is less than 5:
print 'Hello'


What is the result of implementing this code?
A 'Hello' will print four times.
B 'Hello' will print five times.
C The program will throw an error.

, D278 Pre-Assessment Scripting and
Programming Foundations Questions and
100% Correct Answers– WGU

D 'Hello' will print indefinitely. - correct answer 'Hello' will print indefinitely


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 i<20/>


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

Document information

Uploaded on
November 8, 2025
Number of pages
22
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
CA$19.07

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
9
Followers
0
Items
837
Last sold
4 months ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions