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

WGU D335 – Intro to Python Objective Assessment | OA | Questions and Answers | 2026 Update | 100% Correct.

Rating
-
Sold
-
Pages
71
Grade
A+
Uploaded on
02-01-2026
Written in
2025/2026

WGU D335 – Intro to Python Objective Assessment | OA | Questions and Answers | 2026 Update | 100% Correct.

Content preview

WGU D335 – Intro to Python Objective Assessment | OA | Questions
and Answers | 2026 Update | 100% Correct.
🧪 WGU D335 – Intro to Python

FULL 60-Question Timed Mock OA



SECTION 1: Python Basics (Q1–Q10)

1. Which statement correctly prints text in Python?
A. echo "Hello"
B. print["Hello"]
C. print("Hello")
D. console.log("Hello")



2. Which of the following is a valid variable name?
A. total-cost
B. 2total
C. _totalCost
D. total cost



3. What is the data type of the value returned by input()?
A. int
B. float
C. str
D. bool



4. What is the output?

print(type(5))

A. <class 'float'>
B. <class 'int'>
C. <class 'str'>
D. <class 'number'>



5. Which operator performs exponentiation?
A. ^
B. *

,C. **
D. //



6. What is the output?

x=7

y=2

print(x % y)

A. 3
B. 2
C. 1
D. 0



7. Which keyword converts a value to an integer?
A. int()
B. str()
C. float()
D. bool()



8. What will this code output?

print("5" + "3")

A. 8
B. 53
C. Error
D. 5 3



9. Which symbol is used for comments in Python?
A. //
B. /* */
C. #
D. --



10. Which statement assigns multiple variables correctly?
A. a = b = c 10
B. a, b, c = 1, 2, 3

,C. a <- 1
D. int a = 5



SECTION 2: Conditionals & Loops (Q11–Q20)

11. Which operator checks equality?
A. =
B. !=
C. ==
D. <=



12. What is the output?

x=4

if x > 5:

print("A")

else:

print("B")



13. Which loop executes at least once?
A. for
B. while
C. do-while
D. Python has none



14. What does continue do?
A. Stops the loop
B. Skips current iteration
C. Restarts program
D. Ends function



15. What is the output?

for i in range(3):

print(i)

A. 1 2 3
B. 0 1 2

, C. 0 1 2 3
D. Error



16. Which statement creates an infinite loop?
A. while True:
B. for i in range(0):
C. if True:
D. while False:



17. What keyword exits a loop immediately?
A. stop
B. exit
C. break
D. end



18. What is the output?

x = 10

while x > 7:

x -= 1

print(x)

A. 7
B. 8
C. 9
D. 10



19. Which conditional checks multiple conditions?
A. if else
B. if elif else
C. switch
D. case



20. Which value evaluates to False?
A. 1
B. "False"
C. []
D. "0"

Written for

Document information

Uploaded on
January 2, 2026
Number of pages
71
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$19.99
Get access to the full document:

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


Also available in package deal

Thumbnail
Package deal
WGU D335 – Intro to Python Full Solution Pack:100% guaranteed success.
-
3 2026
$ 25.28 More info

Get to know the seller

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.
Wiseman NURSING
View profile
Follow You need to be logged in order to follow users or courses
Sold
8087
Member since
4 year
Number of followers
3887
Documents
30177
Last sold
9 hours ago
Premier Academic Solutions

3.9

1634 reviews

5
799
4
298
3
253
2
93
1
191

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