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 41 pages
Exam (elaborations)

D335 INTRODUCTION TO PROGRAMMING IN PYTHON PRE-ASSESSMENT & PERFORMANCE ASSESSMENT PRACTICE EXAM 2026/2027 COMPLETE (65) CURRENT TESTING QUESTIONS AND CORRECT ANSWERS WITH DETAILED RATIONALES.

Document preview thumbnail
Preview 4 out of 41 pages

Prepare for the D335 Introduction to Programming in Python Pre-Assessment & Performance Assessment with a focused practice resource designed to reinforce essential Python programming concepts. It supports review of topics such as variables, data types, control flow, functions, loops, lists, and problem-solving techniques. The resource can help you assess your understanding, build confidence, and identify areas that need additional practice before completing the assessments. This resource is best suited for WGU D335 students preparing for the Pre-Assessment and Performance Assessment in Introduction to Programming in Python.

Content preview

Page 1 of 41


D335 INTRODUCTION TO PROGRAMMING IN PYTHON
PRE-ASSESSMENT & PERFORMANCE ASSESSMENT
PRACTICE EXAM 2026/2027 COMPLETE (65) CURRENT
TESTING QUESTIONS AND CORRECT ANSWERS WITH
DETAILED RATIONALES.
PYTHON
Prepare for the D335 Introduction to Programming in Python Pre-Assessment &
Performance Assessment with a focused practice resource designed to reinforce
essential Python programming concepts. It supports review of topics such as
variables, data types, control flow, functions, loops, lists, and problem-solving
techniques. The resource can help you assess your understanding, build confidence,
and identify areas that need additional practice before completing the assessments.
This resource is best suited for WGU D335 students preparing for the Pre-Assessment
and Performance Assessment in Introduction to Programming in Python.



MULTIPLE CHOICE.
SECTION 1: MULTIPLE CHOICE QUESTIONS
Python Fundamentals & Data Types (Questions 1-15)
1. What is Python primarily classified as?
a) A compiled, statically typed language
b) A markup language
c) A low-level machine language
d) An interpreted, high-level, general-purpose programming language
e) A hardware description language
Answer: d) An interpreted, high-level, general-purpose programming
language
Rationale: Python is an interpreted language, meaning code is executed line
by line by the Python interpreter. It is high-level because it abstracts away
memory management and hardware details, and general-purpose because it
supports web development, data science, automation, AI, and more.

, Page 2 of 41


2. Which symbol is used to write a single-line comment in Python?
a) //
b) /*
c) #
d) --
e) $$
Answer: c) #
Rationale: In Python, the hash symbol # begins a single-line comment.
Everything after # on that line is ignored by the interpreter. // is used in
languages like JavaScript and C++.


3. What will print(type(5)) output?
a) <class 'float'>
b) <class 'str'>
c) <class 'int'>
d) <class 'number'>
e) <class 'double'>
Answer: c) <class 'int'>
Rationale: The integer literal 5 belongs to the int class in
Python. type() returns the data type of a value, and Python uses <class
'int'> as its representation for integers.


4. Which of the following is a valid Python variable name?
a) 2variable
b) my-variable
c) class
d) my_variable
e) my variable
Answer: d) my_variable
Rationale: Python variable names must begin with a letter or underscore,
followed by letters, digits, or underscores. 2variable starts with a digit, my-
variable contains a hyphen, class is a reserved keyword, and my
variable contains a space.

, Page 3 of 41




5. What does the print() function do in Python?
a) Reads input from the user
b) Saves data to a file
c) Outputs text or values to the console
d) Declares a variable
e) Compiles the program
Answer: c) Outputs text or values to the console
Rationale: The print() function outputs its arguments to standard output (the
console). It is one of Python's built-in functions and is commonly used for
displaying results, debugging, and user interaction.


6. Which of the following correctly assigns the value 10 to a variable
named x?
a) x == 10
b) 10 = x
c) x = 10
d) int x = 10
e) var x = 10
Answer: c) x = 10
Rationale: In Python, the single = is the assignment operator. The variable
name goes on the left and the value on the right. == is for comparison, and
Python does not require type declarations like int.


7. What is the output of print() in Python 3?
a) 3
b) 3.0
c) 3.3333333333333335
d) 3.33
e) Error
Answer: c) 3.3333333333333335
Rationale: In Python 3, the / operator always performs true (float) division,

, Page 4 of 41


returning a float. The result is 3.3333333333333335 due to floating-point
representation.


8. What is the output of print(10 // 3)?
a) 3
b) 3.0
c) 3.3333333333333335
d) 4
e) Error
Answer: a) 3
Rationale: The // operator performs floor division, which returns the integer
quotient, discarding any remainder. 10 // 3 equals 3.


9. What is the output of print(10 % 3)?
a) 3
b) 1
c) 0
d) 3.333
e) Error
Answer: b) 1
Rationale: The % operator is the modulo operator, which returns the
remainder of the division. 10 % 3 equals 1.


10. What will print(3 + 2.5) output?
a) 5
b) 5.5
c) 6
d) Error
Answer: b) 5.5
Rationale: Python automatically performs implicit type conversion. The
integer 3 is converted to a float to perform the addition, resulting in a float
value of 5.5.

Document information

Uploaded on
September 1, 2026
Number of pages
41
Written in
2026/2027
Type
Exam (elaborations)
Contains
Unknown
$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.
Tutorelias
4.5
(2)
Sold
19
Followers
0
Items
3326
Last sold
1 week 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