• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 29 pages
Exam (elaborations)

WGU D335 Introduction to Programming in Python Exam 2026 – Complete Practice Test and Study Guide

Document preview thumbnail
Preview 3 out of 29 pages

Prepare for the WGU D335 Introduction to Programming in Python Exam with comprehensive practice questions and correct answers covering Python programming fundamentals, variables, data types, operators, conditional statements, loops, functions, lists, dictionaries, strings, file handling, debugging, and problem-solving techniques. Ideal for strengthening programming skills and preparing for the WGU D335 assessmen

Content preview

WGU D335 EXAM QUESTIONS AND CORRECT
ANSWERS (VERIFIED ANSWERS) Q&A 2027
|INSTANT DOWNLOAD PDF

1. Which of the following best describes Python?
A. A hardware programming language B. A high-level,
interpreted programming language C. A database management
system D. An operating system
Correct Answer: B. A high-level, interpreted programming
language
Rationale: Python is a high-level programming language known
for readable syntax and an interpreter that executes Python
code.
2. Which symbol is used to create a single-line comment in
Python?
A. // B. /* C. # D. --
Correct Answer: C. #
Rationale: The hash symbol (#) indicates a single-line comment.
Python ignores comments during program execution.
3. Which function displays output on the screen in Python?
A. input() B. print() C. display() D. output()
Correct Answer: B. print()

,Rationale: The print() function displays text, variables, and
other values in the console.
4. Which function is used to receive input from a user?
A. read() B. scan() C. input() D. get()
Correct Answer: C. input()
Rationale: The input() function pauses program execution and
accepts information entered by the user. It returns the entered
value as a string.
5. Which of the following is a valid Python variable name?
A. 2value B. my-value C. my_value D. class
Correct Answer: C. my_value
Rationale: Python variable names may contain letters,
numbers, and underscores but cannot begin with a number or
use reserved keywords.
6. What is the data type of the value 25?
A. float B. int C. str D. bool
Correct Answer: B. int
Rationale: Whole numbers without decimal points are
represented by the integer (int) data type.
7. Which data type represents decimal numbers in Python?
A. int B. str C. float D. bool
Correct Answer: C. float

,Rationale: The float data type represents numbers containing
decimal points, such as 3.14 or 12.5.
8. What is the result of 10 // 3?
A. 3.33 B. 3 C. 1 D. 4
Correct Answer: B. 3
Rationale: The floor division operator (//) divides two numbers
and returns the quotient rounded down to the nearest integer.
9. What is the result of 10 % 3?
A. 3 B. 1 C. 0 D. 3.33
Correct Answer: B. 1
Rationale: The modulus operator (%) returns the remainder
after division. Ten divided by three leaves a remainder of one.
10. Which operator is used for exponentiation in Python?
A. ^ B. ** C. // D. %%
Correct Answer: B. **
Rationale: The double asterisk operator (**) raises a number to
a specified power. For example, 2 ** 3 equals 8.
11. What is the result of 5 + 3 * 2?
A. 16 B. 13 C. 11 D. 10
Correct Answer: C. 11
Rationale: Python follows operator precedence. Multiplication
occurs before addition, so 3 × 2 = 6, followed by 5 + 6 = 11.

Document information

Uploaded on
November 21, 2026
Number of pages
29
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$24.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.
ALPHAGRAY
3.6
(21)
Sold
95
Followers
3
Items
8995
Last sold
15 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