PREASSESSMENTComplete Objective Assessment |76 100% SCORE
Questions and Answers Score
WGU D278 – SCRIPTING AND PROGRAMMING FOUNDATIONS (2025/2026) | PRE-
ASSESSMENT |70 QUESTIONS AND ANSWERS
1. What is the role of flags in regular expressions?
Specify the data types in regular expressions
Modify the behavior of regular expressions
Define the syntax of regular expressions
Determine the execution speed of regular expressions
2. What is the primary function of a shell interpreter?
To provide a graphical user interface for programming.
To manage system resources and processes.
To compile programming languages into machine code.
To execute commands read from input or from a script file.
3. What are the three types of testing practices mentioned in the context of
programming?
Regression testing, load testing, and system testing
Functional testing, performance testing, and code reviews
Static testing, dynamic testing, and user acceptance testing
Unit testing, integration testing, and debugging tools
4. Describe the significance of the word boundary anchor ( ) in the context of regular
expressions.
The word boundary anchor ( ) matches any character in a string, making it less
specific.
The word boundary anchor ( ) indicates the start of a new line in a string.
The word boundary anchor ( ) is used to match only uppercase letters in a
string.
WGU D278 – Scripting and Programming Foundations PREASSESSMENT 1/24
,11/26/25, 7:15 PM WGU D278 – Scripting and Programming Foundations
PREASSESSMENTComplete Objective Assessment |76
The word boundary anchor ( ) helps identify the transition between word
Questions and Answers
characters and non-word characters, allowing for precise pattern matching.
5. Describe the role of backreferences in regular expressions and how they enhance
pattern matching.
Backreferences are irrelevant in pattern matching.
Backreferences simplify regex by removing the need for groups.
Backreferences are used to match only numeric values.
Backreferences enhance pattern matching by allowing the regex to refer
back to previously captured groups, enabling more complex and dynamic
matching.
6. What is the definition of flow of execution in the context of scripting?
The order in which individual statements, instructions, or function calls are
executed in a script.
The way in which variables are declared in a script.
The process of compiling a script into machine code.
The method of debugging a script to find errors.
7. What is the primary purpose of Windows PowerShell?
Game development and graphics rendering
Web development and design
Task automation and configuration management
Database management and queries
8. Describe the significance of redirection in scripting and how it enhances data
handling.
Redirection allows scripts to send and receive data from files, improving
data handling and flexibility.
WGU D278 – Scripting and Programming Foundations PREASSESSMENT 2/24
, 11/26/25, 7:15 PM WGU D278 – Scripting and Programming Foundations
PREASSESSMENTComplete Objective Assessment |76
Redirection is a method for optimizing script execution speed.
Questions and Answers
Redirection helps in debugging scripts by displaying error messages.
Redirection is used to compile scripts into executable files.
9. What do module objectives specify in an educational setting?
The teaching methods employed during the module.
The historical context of the subject matter.
The assessment criteria for student performance.
Specific learning outcomes and skills expected to be achieved.
10. Describe the role of scripts in software applications.
Scripts are only used for debugging purposes.
Scripts are primarily used for compiling code into machine language.
Scripts are designed to replace the need for programming languages.
Scripts are used to automate repetitive tasks and enhance the functionality
of software applications.
11. Describe the significance of the start of string anchor (^) in the context of pattern
matching in regular expressions.
The start of string anchor (^) ensures that the pattern must match from the
very beginning of the string, which is crucial for precise pattern matching.
The start of string anchor (^) allows for matches anywhere in the string,
making it flexible.
The start of string anchor (^) indicates that the match can occur at the end of
the string.
The start of string anchor (^) is used to match whitespace characters.
12. What do CGI scripts primarily handle in web applications?
User input from forms
WGU D278 – Scripting and Programming Foundations PREASSESSMENT 3/24