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

WGU D335 Python Programming Exam - Questions with Correct Answers (Verified Update)

Document preview thumbnail
Preview 2 out of 10 pages

WGU D335 Python Programming Exam: 165 exam questions with verified correct answers, for WGU D335. 10 pages, 2026 verified update. Sample questions covered: Student Identification Number | Formatted Student ID Output | Input Validation The student ID must be between for Student ID | Formatted ID The formatted ID is constructed Construction

Content preview

WGU D335 Python Programming Exam - Questions
with Correct Answers (Verified Update)
165 questions with answers
Topic: WGU D335 Python Programming Exam

1. Student Identification Number
Answer: A 9-digit unformatted integer input representing a student's ID.

2. Formatted Student ID Output
Answer: The output format for the student ID is <ssn>.

3. Input Validation The student ID must be between 100000000 for Student ID
Answer: and 999999999.

4. Formatted ID The formatted ID is constructed Construction
Answer: using parts derived from the student ID.

5. Predefined List A list containing
Answer: the values [4, -27, 15, 33, -10].

6. Boolean Value Output
Answer: Indicates whether the input value is greater than the maximum value from
predef_list.

7. is calculated using the max() function.
Answer: Max Value Calcu- The maximum value from predef_list lation

8. Frameworks List A list of web frameworks: Gears'].
Answer: ['Django', 'Flask', 'CherryPy', 'Bottle', 'Web2Py', 'Turbo-

9. Index Value In- An integer input representing put
Answer: the index of a string element in the frameworks list.

10. Exception Han- A try block that raises an 'Error' for incompatible dling
Answer: integer inputs.

11. Water Temperature Input
Answer: An integer input representing water temperature in degrees Fahrenheit.

12. Water State De- Describes the state of water based on temperature scription
Answer: ranges.

13. Frozen Water State
Answer: Water is 'Frozen' if the temperature is below 33° F.

14. is between 33° F and 80° F.
Answer: Cold Water State Water is 'Cold' if the temperature

15. Warm Water State
Answer: Water is 'Warm' if the temperature is between 80° F and 115° F.

16. is between 115° F and 211° F.
Answer: Hot Water State Water is 'Hot' if the temperature


Page 1

, 17. Boiling Water State
Answer: Water is 'Boiling' if the temperature is greater than or equal to 212° F.

18. water_state
Answer: Describes the state of water based on temperature.

19. optional_safety_comment
Answer: Safety comment displayed based on specific water temperatures.

20. temperature
Answer: The current temperature of the water.

21. Frozen
Answer: State of water when temperature is less than 33° F.

22. Cold
Answer: State of water when temperature is between 33° F and 80° F.

23. Warm
Answer: State of water when temperature is between 80° F and 115° F.

24. Hot
Answer: State of water when temperature is between 115° F and 212° F.

25. Boiling
Answer: State of water when temperature is 212° F or higher.

26. Caution: Hot!
Answer: Safety comment displayed when water temperature is exactly 212° F.

27. is less than 33° F.
Answer: Watch out for ice! Safety comment displayed when water temperature

28. Reverse Binary
Answer: Representing an integer in reverse binary by outputting remainders of division by
2.

29. __name__ == '__main__'
Answer: Used to separate the main code from the function's code for unit testing.

30. Driving Cost Function
Answer: Function taking miles per gallon, price per gallon, and miles driven to return the
dollar cost.

31. Coin Flip Function
Answer: Function returning 'Heads' or 'Tails' based on a random value of 1 or 0.

32. Unit Tests
Answer: Testing small parts of a program in an isolated manner to ensure they work as
expected.

33. Unit test
Answer: Evaluates individual functions for correctness and proper naming, parameters, and
return type.



Page 2

Document information

Uploaded on
November 13, 2026
Number of pages
10
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
CA$13.21

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.
EmilyRhodes
4.4
(15)
Sold
82
Followers
1
Items
10346
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