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 3 out of 21 pages
Exam (elaborations)

WGU D335 IntroDUctIon to ProGrammInG In Python objectIve assessment actUal exam – Western Governors UnIversIty (WGU) – 2026/2027 acaDemIc year – verIfIeD QUestIons anD ansWers for comPUter scIence anD It stUDents || verIfIeD by exPerts.

Document preview thumbnail
Preview 3 out of 21 pages

his document is a comprehensive study and exam preparation resource for WGU D335 – Introduction to Programming in Python (Objective Assessment). It contains practice questions, review exercises, guide answers, and detailed rationales designed to help Western Governors University students review foundational Python programming concepts and prepare for the Objective Assessment. The content typically covers Python syntax, variables, data types, operators, expressions, input and output, conditional statements, loops, functions, recursion, strings, lists, tuples, dictionaries, sets, file input/output, exception handling, modules, object-oriented programming fundamentals, debugging, testing, algorithm development, problem-solving, code tracing, data processing, program design, software development fundamentals, and basic computational thinking. Additional topics include coding best practices, program documentation, control structures, user-defined functions, and scenario-based programming exercises that reinforce real-world Python programming skills. The material is organized in a question-and-answer format with explanatory rationales to reinforce Python programming knowledge, strengthen coding and analytical problem-solving skills, and support preparation for the WGU D335 Introduction to Programming in Python Objective Assessment.

Content preview

WGU D335 IntroDUctIon to ProGrammInG In Python objectIve
assessment actUal exam – Western Governors UnIversIty
(WGU) – 2026/2027 acaDemIc year – verIfIeD QUestIons anD
ansWers for comPUter scIence anD It stUDents || verIfIeD by
exPerts.


EXAM OVERVIEW

Category Details


Course D335 – Introduction to Programming in Python


Institution Western Governors University (WGU)


Assessment Objective Assessment (OA) – NKO2


Format Performance-based, code-writing exam (approximately 15 coding questions)


Passing
80% (12 correct selections out of 15)
Score


Python Fundamentals & Syntax (25%), Data Types & Structures (25%), Control Flow & Loop
Key
(20%), Functions & Modules (15%), File I/O & Exception Handling (10%), Problem Solving &
Domains
Algorithms (5%)



DOMAIN 1: PYTHON FUNDAMENTALS & SYNTAX
Question 1
A program consists of which three basic instruction types?
A) Read, Write, Execute
B) Input, Process, Output
C) Compile, Link, Run
D) Define, Call, Return

correct ansWer: B) Input, Process, Output

,<span style="color:red">Rationale: Every program follows the IPO model: it takes input (from
keyboard, file, etc.), processes that data (computations, logic), and produces output (to screen,
file, etc.).</span>


Question 2
What is a variable in Python?
A) A fixed value that cannot change
B) A named reference to a value stored in memory
C) A type of loop structure
D) A function that prints output

correct ansWer: B) A named reference to a value stored in memory
<span style="color:red">Rationale: A variable is a named item used to hold a value. It acts as a
reference or label that points to an object in memory. Variables can be reassigned to different
values.</span>


Question 3
What is an algorithm?
A) A type of Python data structure
B) A sequence of instructions that solves a problem
C) A built-in Python function
D) An error in program execution

correct ansWer: B) A sequence of instructions that solves a problem
<span style="color:red">Rationale: An algorithm is a step-by-step sequence of instructions
designed to solve a specific problem or accomplish a task.</span>


Question 4
What does the assignment operator = do in Python?
A) Compares two values for equality
B) Assigns a value to a variable
C) Adds two numbers together
D) Creates a new variable type

correct ansWer: B) Assigns a value to a variable

<span style="color:red">Rationale: The = operator is the assignment operator. It assigns the
value on the right side to the variable on the left side. It does NOT compare values (that is
the == operator).</span>

, Question 5
What is the output of the following Python code?
python
name = "Alice"
age = 30
print(f"{name} is {age} years old.")
A) Alice is 30 years old.
B) {name} is {age} years old.
C) Alice is 30 years old
D) Error

correct ansWer: A) Alice is 30 years old.
<span style="color:red">Rationale: f-strings (formatted string literals) allow expressions to be
evaluated inside curly braces {}. The variables name and age are interpolated into the
string.</span>


Question 6
Which of the following is NOT a valid Python variable name?
A) _myVar
B) my_var_2
C) 2myVar
D) myVar2

correct ansWer: C) 2myVar
<span style="color:red">Rationale: Python variable names must start with a letter (a-z, A-Z) or
an underscore (_). They cannot start with a digit. 2myVar is invalid because it begins with a
number.</span>


Question 7
What is the data type of the expression 3.0 + 2 in Python?
A) int
B) float
C) str
D) bool

correct ansWer: B) float

Document information

Uploaded on
August 1, 2026
Number of pages
21
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$23.98

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.
DoctorDee
3.5
(6)
Sold
35
Followers
7
Items
5350
Last sold
2 days 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