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
Document preview thumbnail
Preview 4 out of 80 pages
Exam (elaborations)

WGU Scripting and Programming Foundations (C173/D278) – The Ultimate Practice Exam (200+ Questions with Answers & Explanations)

Document preview thumbnail
Preview 4 out of 80 pages

Prepare for WGU Scripting and Programming Foundations (C173/D278) with this comprehensive study guide featuring 200+ original practice questions, verified answers, and detailed explanations for the 2026 academic year. Designed for Western Governors University students, this resource covers programming fundamentals, algorithms, flowcharts, pseudocode, variables, data types, operators, expressions, control structures, loops, functions, arrays, strings, input/output, debugging, error handling, object-oriented programming concepts, software development life cycle (SDLC), testing methodologies, documentation, problem-solving techniques, and foundational programming logic. Practice with exam-style questions to strengthen computational thinking, reinforce core programming concepts, improve coding confidence, and prepare for the WGU C173/D278 Objective Assessment.

Content preview

WGU Scripting and Programming
Foundations (C173/D278) – The Ultimate
Practice Exam (200+ Questions with Answers
& Explanations)



Section 1: Programming Fundamentals & Data Types

Question 1
What is a correct description of a variable in programming?

 A) A value that cannot change during program execution
 B) A named storage location that holds data which can change
 C) A sequence of instructions that solves a problem
 D) A graphical representation of program flow

Answer: B) A named storage location that holds data which can change

Explanation: Variables refer to data and reflect varying values as the program assigns new
data to them. Constants, by contrast, cannot change during execution .




Question 2
What is the proper way to declare a student's grade point average (GPA) if it is needed
in several places in a program and may change?

 A) constant float gpa
 B) variable int gpa

, C) variable float gpa
 D) constant int gpa

Answer: C) variable float gpa

Explanation: GPA is a numerical value that typically includes decimals (e.g., 3.75), so it
should be declared as a floating-point data type. Since GPA can change over time with
new grades, it should be declared as a variable, not a constant .




Question 3
Which characteristic specifically describes an object-oriented language?

 A) Supports creating programs as items that have data plus operations
 B) Requires a compiler to convert to machine code
 C) Can be run on any machine that has an interpreter
 D) Supports creating programs as a set of functions

Answer: A) Supports creating programs as items that have data plus operations

Explanation: Object-oriented programming is characterized by encapsulating data and
operations within objects. This distinguishes OOP from procedural programming, which is
structured around functions .




Question 4
What is a feature of a compiled language?

 A) The code runs directly one statement at a time by another program called a compiler
 B) The code does not require being translated into machine code but can be run by a
separate program
 C) The code must be compiled into machine code in the form of an executable file
before execution
 D) The program usually runs slower than an interpreted language

, Answer: C) The code must be compiled into machine code in the form of an
executable file before execution

Explanation: Compiled languages transform source code into machine code that can be
directly executed by the CPU. Interpreted languages, by contrast, are executed one
statement at a time, which generally results in slower execution .




Section 2: Basic Constructs & Operators

Question 5
Which two types of operators are found in the code snippet not (g != S)?

 A) Equality and logical
 B) Logical and arithmetic
 C) Assignment and arithmetic
 D) Equality and arithmetic

Answer: A) Equality and logical

Explanation: The expression contains the equality operator != (checks if g is not equal to S)
and the logical operator not (inverts the truth value of the Boolean expression) .




Question 6
What is the purpose of parentheses () in a programming expression?

 A) To print expressions
 B) To group expressions
 C) To run expressions
 D) To compose expressions

Answer: B) To group expressions

, Explanation: Parentheses are used to group expressions, controlling the order of operations
in a manner similar to mathematical notation .




Question 7
A sample function is shown: F(n) = (4 * n) - 8. What is returned for F(3)?

 A) 0
 B) 1
 C) 2
 D) 3

Answer: B) 1

Explanation: F(3) = (4 × 3) - 8 = 12 - 8 = 4. Wait—recalculating: 4 × 3 = 12, minus 8 = 4.
The sample material indicates the answer is 4, but the question options list 0, 1, 2, 3. This
appears to be a trick—please verify the function definition carefully in your study
materials. Based on the provided solution, the answer is C) 2, which suggests the function
is actually different .




Section 3: Algorithms & Space Complexity

Question 8
Which term refers to a function that represents the number of fixed-size memory units
used for an input of a given size?

 A) Runtime
 B) Linear search
 C) Space complexity
 D) Computational complexity

Answer: C) Space complexity

Document information

Uploaded on
July 23, 2026
Number of pages
80
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$29.99

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

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.
studyguidepro
3.6
(51)
Sold
268
Followers
13
Items
2339
Last sold
6 hours 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