100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

WGU D278 FINAL EXAM PREP SCRIPTING AND PROGRAMMING - FOUNDATIONS: (LATEST 2026/2027 UPDATE), WITH CORRECT/ACCURATE ANSWERS

Rating
-
Sold
-
Pages
51
Grade
A+
Uploaded on
29-12-2025
Written in
2025/2026

WGU D278 FINAL EXAM PREP SCRIPTING AND PROGRAMMING - FOUNDATIONS: (LATEST 2026/2027 UPDATE), WITH CORRECT/ACCURATE ANSWERS

Institution
WGU D278
Module
WGU D278











Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
WGU D278
Module
WGU D278

Document information

Uploaded on
December 29, 2025
Number of pages
51
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

WGU D278 FINAL EXAM PREP SCRIPTING
AND PROGRAMMING - FOUNDATIONS:
(LATEST 2026/2027 UPDATE), WITH
CORRECT/ACCURATE ANSWERS


WGU D278 FINAL EXAM PREP SCRIPTING
AND PROGRAMMING - FOUNDATIONS

WGU D278 – Final Exam Prep (2026/2027 Update)
Scripting and Programming – Foundations


Question 1

Which change would correct the following algorithm so that it correctly identifies the
maximum number from a list containing the values 2, 7, 8, 3, 9, and 1?

max = 0
for each value
if value > max
max = value
else
max = 0

A. Initialize max to the first value in the list
B. Remove the else clause
C. Replace > with <
D. Move max = 0 outside the loop

Correct Answer: B

Rationale:
The else clause incorrectly resets the maximum value to zero whenever a value is not
greater than the current maximum. This causes previously stored maximum values to
be lost. By removing the else clause, the algorithm only updates max when a larger
value is found, preserving the correct maximum throughout the loop. This ensures the
algorithm functions as intended.

,Question 2

What does algorithm time efficiency measure?

A. The amount of memory an algorithm uses
B. The readability of an algorithm
C. The number of calculations required to solve a problem
D. The number of variables in a program

Correct Answer: C

Rationale:
Algorithm time efficiency refers to how many operations or calculations an algorithm
performs as input size increases. It helps determine how well an algorithm scales and
performs under larger workloads. Time efficiency is often expressed using Big-O
notation. Understanding efficiency allows programmers to choose faster solutions.




Question 3

Which search algorithm is generally the most efficient when working with a sorted list?

A. Linear search
B. Hash search
C. Binary search
D. Sequential search

Correct Answer: C

Rationale:
Binary search repeatedly divides a sorted list in half, significantly reducing the number
of comparisons required. This gives it a time complexity of O(log n), which is much
faster than linear search for large datasets. However, binary search requires the data
to be sorted beforehand. When that condition is met, it is the most efficient option.

,Question 4

Place the steps of a binary search algorithm in the correct order.

A. Compare the midpoint value to the target
B. Find the midpoint of the sorted list
C. Repeat until the value is found or the list is exhausted
D. Choose the left or right half based on comparison

Correct Order:

1. B
2. A
3. D
4. C

Rationale:
Binary search begins by identifying the midpoint of a sorted list. The midpoint is
compared to the target value to determine which half may contain the target. The
algorithm then narrows the search range accordingly. This process repeats until the
value is found or no elements remain.




Question 5

Arrange the steps of the following algorithm in the correct order to plant a seed.

A. Put pot in sunlight
B. Cover seed with soil
C. Fill pot with soil
D. Poke hole in soil
E. Water pot in a shady area
F. Place seed in hole

Correct Order:

, 1. C
2. D
3. F
4. B
5. E
6. A

Rationale:
Algorithms require logical sequencing to achieve the desired outcome. Soil must be
added before creating a hole, and the seed must be placed before covering it.
Watering occurs after planting to support germination. Sunlight is introduced last to
promote healthy growth.




Question 6

What is the primary purpose of UML (Unified Modeling Language)?

A. To write executable code
B. To test software performance
C. To visualize the structure and behavior of programs
D. To replace programming languages

Correct Answer: C

Rationale:
UML provides standardized diagrams that visually represent system components and
interactions. These diagrams help developers and stakeholders understand system
architecture and behavior. UML improves communication during development and
reduces ambiguity. It does not replace code but complements it.




Question 7

Which UML diagrams are commonly used during the testing phase of the SDLC?
£14.55
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached


Also available in package deal

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Elitaa Chamberlain university
Follow You need to be logged in order to follow users or courses
Sold
168
Member since
1 year
Number of followers
25
Documents
7086
Last sold
1 week ago
100% VALID NURSING 507 ADVANCED PATHOPHYSIOLOGY EXAMS 2025/2026 GRADED A+ RATED, AND HIGHLY RECOMMENDED FROM CHAMBERLAIN UNIVERSITY &amp; OTHERS eg BSN246 HESI, BIOS 256, TFM08, WGU D027 AND WGU D236 PATHO etc.... AND DON'T BE A CHALLENGE TO BE CHALLENG

We have just re-established our shop, my aim is to elevate and guide students academically with actual guides and exams 100% verified.Incase you dont find the exam that you are looking for,feel free to inbox me and request any exam.My prices are never fixed,always negotiable , WELCOME ,LETS BEGIN.

3.6

25 reviews

5
10
4
5
3
5
2
1
1
4

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

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

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight 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 smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions