Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

WGU D278 SCRIPTING AND PROGRAMMING ACTUAL EXAM PAPER 2026 QUESTIONS WITH ANSWERS GRADED A+

Beoordeling
-
Verkocht
-
Pagina's
59
Cijfer
A+
Geüpload op
08-04-2026
Geschreven in
2025/2026

WGU D278 SCRIPTING AND PROGRAMMING ACTUAL EXAM PAPER 2026 QUESTIONS WITH ANSWERS GRADED A+

Instelling
WGU D278
Vak
WGU D278

Voorbeeld van de inhoud

WGU D278 SCRIPTING AND
PROGRAMMING ACTUAL EXAM PAPER
2026 QUESTIONS WITH ANSWERS
GRADED A+

◍ Bit and Byte.
Answer: A single 0 or 1 is called a bit. 1011 is four bits. Eight bits, like
11000101, are called a byte.
◍ Calculating toll amount..
Answer: OUTPUTToll: 4.6_
◍ What is the loop variable update statement in the following pseudocode?.
Answer: a) x = 1b) x ! = 10c) x = x + 1answerc) x = x + 1Each loop
iteration, the loop variable x is assigned with x + 1.
◍ In the example below, if a user inputs an age less than 25, the statement
insurePrice = 4800 executes. Else, insurePrice = 2200 executes.Insurance
price..
Answer: output is, Annual price: $4800_
◍ What are the values of i where each loop expression is true?.
Answer: 0, 1, 2, 3, 4, 5i starts with 0. When i reaches 6, the loop body will
not be entered because 6 < 6 is false.
◍ Write a program that takes in an integer in the range 20-98 as input. The
output is a countdown starting from the integer, and stopping when both
output digits are identical.Ex: If the input is:93.
Answer: the output is:93 92 91 90 89 88
◍ A "jiffy" is the scientific name for 1/100th of a second. Define a function
named SecondsToJiffies that takes a float as a parameter, representing the

, number of seconds, and returns a float that represents the number of
"jiffies". Then, write a main program that reads the number of seconds as an
input, calls function SecondsToJiffies() with the input as argument, and
outputs the number of "jiffies".Ex: If the input of the program is:15.
Answer: the function returns and the program outputs:1500.0Your program
should define and call a function:Function SecondsToJiffies(float
userSeconds) returns float userJiffies
◍ function.
Answer: is a list of statements executed by invoking the function's name,
with such invoking known as a function call. Any function input values, or
arguments, appear within ( ), and are separated by commas if more than one.
◍ Basic instruction types are:.
Answer: Input: A program gets data, perhaps from a file, keyboard,
touchscreen, network, etc.Process: A program performs computations on
that data, such as adding two values like x + y.Output: A program puts that
data somewhere, such as to a file, screen, network, etc.
◍ Write code that assigns finalResult with the sum of num1 and num2, divided
by 2.Ex: If num1 is 7 and num2 is 5, the output is:Result: 6.
Answer: In an expression, parentheses may be used to give an operator
precedence. Ex: Given (firstNum - secondNum) / 5, the subtraction of
firstNum and secondNum is evaluated, then the result is divided by 5.
◍ In a Coral flowchart,.
Answer: a parallelogram represents an output statement, written as: Put item
to output.
◍ While and for loops.
Answer: while loop is a loop that repeatedly executes the loop body while
the loop's expression evaluates to true. A for loop is a loop consisting of a
loop variable initialization, a loop expression, and a loop variable update
that typically describes iterating for a specific number of times.
◍ Good practice is to create meaningful identifier names that self-describe an

, item's purpose. Good practice minimizes use of abbreviations in identifiers
except for well-known ones like num in numPassengers. Programmers must
strive to find a balance. Abbreviations make programs harder to read and
can lead to confusion. Long variable names, such as
averageAgeOfUclaGraduateStudent may be meaningful, but can make
subsequent statements too long and thus hard to read..
Answer: example
◍ In the program above, what is the purpose of this decision
statement:((nthPerson >= 1) and (nthPerson <= 5)).
Answer: To ensure only valid array elements are accessed because the array
oldestPeople only has 5 elements.
◍ Which statement executes second?.
Answer: hoursToFly = milesTraveled / 500.0Assignment statements in code
use a similar structure to assignment statements in flowcharts of
programming languages. The left side of the = is a variable, and the right
side is an expression.
◍ Testing.
Answer: The fourth SDLC phase checks the system functions properly and
meets requirements.
◍ The following is an example of using a loop to compute a mathematical
quantity. The program computes the greatest common divisor (GCD) among
two user-entered integers numA and numB, using Euclid's algorithm: First,
numA must be greater than or equal to num
B. If not, the values are switched. Second, as long as the remainder of
dividing numA by numB is greater than zero, the algorithm loops and
updates the values of numA and numB within each loop..
Answer: GCD is: 8_
◍ Pseudocode.
Answer: is text that resembles a program in a real programming language
but is simplified to aid human understanding. "Code" is a term for a
program written in text. "Pseudo" in this context means "similar to".

, Commonly, each pseudocode text line corresponds to a program statement.
◍ Integer.
Answer: Can hold whole number values, like 1, 999, 0, or -25 (but not 3.5 or
0.001).
◍ Iterating through an array using loops.
Answer: Iterating through arrays using loops is common and is an important
programming skill to master.An array's indices are numbered 0 to size-1, not
1 to size. Thus, when iterating through an array, programmers use the
standard loop form shown below, starting with i = 0, and iterating while i <
size.Such a loop will iterate with i = 0, 1, ..., size - 1, thus matching the
array's indices. If size is 5, the loop iterates with i = 0, 1, 2, 3, 4, as
desired.In Coral, given an array named userVals, the array's size is
accessible as userVals.size.
◍ A basic computer program..
Answer: 1) A basic computer program's instructions get input, process, and
put output. This program first assigns x with what is typed on the keyboard
input, in this case 2.2) The program's next instruction gets the next input, in
this case 5.3) The program then does some processing, in this case assigning
z with x + y (so 2 + 5 yields 7).4) Finally, the program puts z (7) to output,
in this case to a screen
◍ Using an expression for an array index.
Answer: A powerful aspect of arrays is that the index is an expression. Ex:
userNums[i] uses the value held in the integer variable i as the index. As
such, an array is useful to easily lookup the Nth item in a list.An array's
index must be an integer type. The array index cannot be a floating-point
type, even if the value is 0.0, 1.0, etc
◍ algorithm.
Answer: is a sequence of steps that solves a problem, generating correct
output for any valid input values
◍ Comment.

Geschreven voor

Instelling
WGU D278
Vak
WGU D278

Documentinformatie

Geüpload op
8 april 2026
Aantal pagina's
59
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$13.99
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
GradeGalaxy Havard School
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
87
Lid sinds
6 maanden
Aantal volgers
0
Documenten
35464
Laatst verkocht
4 uur geleden
GradeGalaxy

Welcome to the premier destination for high-quality academic support. GradeGalaxy7 provides a comprehensive suite of educational materials, including expertly sourced test banks, solution manuals, and study guides. Our resources are meticulously organized to streamline your revision process and enhance your understanding of core concepts. Equip yourself with the reliable content you need to achieve superior academic results.

4.3

4 beoordelingen

5
2
4
1
3
1
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen