Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

WGU D278 SCRIPTING AND PROGRAMMING FOUNDATIONS ACTUAL QUESTIONS AND CORRECT ANSWERS (VERIFIED ANSWERS) PLUS RATIONALES 2026 Q&A | INSTANT DOWNLOAD PDF

Rating
-
Sold
-
Pages
31
Grade
A+
Uploaded on
26-06-2026
Written in
2025/2026

WGU D278 SCRIPTING AND PROGRAMMING FOUNDATIONS ACTUAL QUESTIONS AND CORRECT ANSWERS (VERIFIED ANSWERS) PLUS RATIONALES 2026 Q&A | INSTANT DOWNLOAD PDF

Institution
3X@M
Course
3X@M

Content preview

WGU D278 SCRIPTING AND PROGRAMMING FOUNDATIONS ACTUAL QUESTIONS AND CORRECT ANSWERS (VERIFIED
ANSWERS) PLUS RATIONALES 2026 Q&A | INSTANT DOWNLOAD PDF

Core Domains
Variables, data types, and constants
Operators and expressions
Input and output
Control flow and branching
Iteration and loops
Functions and modular design
Arrays, lists, and collections
File handling and persistence
Exceptions and debugging
Basic object-oriented concepts

Introduction

This assessment measures foundational programming knowledge and the ability to apply it in practical scenarios. It covers core scripting and
programming concepts such as data types, variables, operators, control structures, iteration, modularity, file handling, and error management.
Questions combine multiple-choice and scenario-based problem solving to reflect the kind of decisions programmers make when writing, testing,
and maintaining code. The focus is on selecting appropriate solutions, recognizing common errors, and applying programming principles to real-
world tasks.

Section One: Questions 1–100
1. Which statement best describes the purpose of a variable?

A. To permanently store a value that cannot change.
B. To hold data that may change during program execution.
C. To convert one data type into another.
D. To define the structure of a class.

, 🟢 Correct answer: B. To hold data that may change during program execution.

🔴 RATIONALE: A variable stores a value that can be updated as the program runs, making it useful for tracking changing data.
2. A programmer needs to store the number of students in a class. Which data type is most appropriate?

A. Boolean
B. Integer
C. String
D. Character

🟢 Correct answer: B. Integer

🔴 RATIONALE: A count of students should be stored as a whole number, which is an integer.
3. Which value would be best stored as a string?

A. 125
B. True
C. "Nairobi"
D. 3.14

🟢 Correct answer: C. "Nairobi"

🔴 RATIONALE: Textual data such as names and locations is stored as a string.
4. What is the primary purpose of a constant?

A. To store a value that should not change during execution.
B. To repeatedly request user input.
C. To define a loop condition.
D. To convert strings to numbers.

🟢 Correct answer: A. To store a value that should not change during execution.

🔴 RATIONALE: Constants are used for values that remain fixed, such as tax rates or configuration values.

,5. Which operator is used for assignment in most programming languages?

A. =
B. ==
C. !=
D. >=

🟢 Correct answer: A. =

🔴 RATIONALE: The assignment operator stores a value in a variable.
6. What does the expression 5 + 2 ∗ 3 evaluate to using standard order of operations?

A. 21
B. 11
C. 17
D. 15

🟢 Correct answer: B. 11

🔴 RATIONALE: Multiplication is performed before addition, so the result is 5 + 6 = 11.
7. Which operator checks whether two values are equal?

A. =
B. !=
C. ==
D. <=

🟢 Correct answer: C. ==

🔴 RATIONALE: Equality comparison uses a double equals sign in many languages.
8. What is the result of a Boolean expression?

, A. A text value
B. A numeric value
C. True or false
D. A loop counter

🟢 Correct answer: C. True or false

🔴 RATIONALE: Boolean expressions evaluate to logical truth values.
9. Which of the following is a valid identifier in most programming languages?

A. 2count
B. total_score
C. total score
D. class

🟢 Correct answer: B. total_score

🔴 RATIONALE: Identifiers typically cannot start with a number or contain spaces.
0. What is the main purpose of commenting code?

A. To make code run faster.
B. To explain logic to humans.
C. To replace variables.
D. To prevent syntax errors.

🟢 Correct answer: B. To explain logic to humans.

🔴 RATIONALE: Comments improve readability and maintainability but do not affect execution.
1. A program asks the user for their age. Which programming construct is being used?

A. Output
B. Input
C. Iteration
D. Casting

Written for

Institution
3X@M
Course
3X@M

Document information

Uploaded on
June 26, 2026
Number of pages
31
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$25.99
Get access to the full document:

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


Also available in package deal

Thumbnail
Package deal
WGU BUDDLE EXAM QUESTIONS AND CORRECT ANSWERS (VERIFIED ANSWERS) PLUS RATIONALES 2026 Q&A | LATEST UPDATE 2026/2027
-
85 2026
$ 980.99 More info

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.
Excellentdocsolution Stanford University
View profile
Follow You need to be logged in order to follow users or courses
Sold
13
Member since
1 year
Number of followers
2
Documents
3038
Last sold
1 week ago
EXELENCE IN EDUCATIOIN

BEST AND AFFORDABLE PRICE

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

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 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