• 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 4 out of 53 pages
Exam (elaborations)

Wgu D335 — Introduction To Programming In Python Exam 2026-27

Document preview thumbnail
Preview 4 out of 53 pages

WGU D335 — INTRODUCTION TO PROGRAMMING IN PYTHON EXAM 2026-27

Content preview

1


WGU D335 — INTRODUCTION TO
PROGRAMMING IN PYTHON EXAM 2026-27
LATEST UPDATED OVERVIEW


Overview
Purpose:
This exam evaluates a student’s understanding of Python programming
fundamentals, including syntax, data structures, functions, object-oriented
programming, and debugging. It focuses on problem-solving and the ability to
write, analyze, and optimize Python code.
Content Areas:
1. Python Basics – Variables, data types, operators, input/output
2. Control Structures – Conditional statements, loops
3. Functions – Definition, parameters, return values, scope
4. Data Structures – Lists, tuples, dictionaries, sets, and string manipulation
5. Object-Oriented Programming (OOP) – Classes, objects, inheritance,
methods
6. File Handling & Exceptions – Reading/writing files, try/except
7. Algorithms & Problem-Solving – Sorting, searching, iteration, recursion
8. Debugging & Testing – Error handling and logical debugging
Format:
• 100 multiple-choice and NGN-style coding scenario questions
• Each question includes correct answer and rationale for exam preparation

,2




Section 1 — Python Basics (1–15)
1. Which of the following is a valid variable name in Python?
A. my_var
B. 2ndVar
C. my-var
D. @variable
Answer: A
Rationale: Variable names must start with a letter or
underscore and cannot include special characters.


2. What is the output of print(type(3.14))?
A. <class 'float'>
B. <class 'int'>
C. <class 'str'>
D. <class 'complex'>
Answer: A
Rationale: 3.14 is a floating-point number in Python.

,3




3. Which operator is used for exponentiation in Python?
A. **
B. ^
C. %
D. //
Answer: A
Rationale: ** raises a number to the power of another number.


4. NGN: What will be the output of print(5 + 3 * 2)?
A. 11
B. 16
C. 13
D. 10
Answer: A
Rationale: Multiplication has higher precedence than addition:
3*2=6, 6+5=11.


5. How do you write a single-line comment in Python?
A. # This is a comment
B. // This is a comment

, 4


C. /* This is a comment */
D. <!-- This is a comment -->
Answer: A
Rationale: Python uses # for single-line comments.


6. Which of the following is mutable?
A. list
B. tuple
C. str
D. int
Answer: A
Rationale: Lists can be changed after creation; tuples, strings,
and integers are immutable.


7. What is the result of len("Python")?
A. 6
B. 5
C. 7
D. 0
Answer: A
Rationale: "Python" has 6 characters.

Document information

Uploaded on
January 16, 2026
Number of pages
53
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$40.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.
Sold
68
Followers
13
Items
2940
Last sold
1 month 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