100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

WGU D335 Introduction to Programming in Python OA ACTUAL EXAM 2025/2026 COMPLETE QUESTIONS WITH CORRECT DETAILED ANSWERS || 100% GUARANTEED PASS <BRAND NEW VERSION>

Rating
-
Sold
-
Pages
31
Grade
A+
Uploaded on
02-06-2025
Written in
2024/2025

WGU D335 Introduction to Programming in Python OA ACTUAL EXAM 2025/2026 COMPLETE QUESTIONS WITH CORRECT DETAILED ANSWERS || 100% GUARANTEED PASS &lt;BRAND NEW VERSION&gt; 1. A program consists of? - ANSWER input, process, output 2. A named item used to hold a value? - ANSWER variable 3. Syntaxes error - ANSWER a violation of the program language rules on how symbols can be defined 4. Runtime error - ANSWER the program attempts an impossible operation 5. Indentation error - ANSWER lines inside the program are not properly indented 6. Value Error - ANSWER invalid value used 7. Name error - ANSWER The program tries to use a variable that does not exist. 8. Type error - ANSWER An operation uses incorrect types - can occur if adding an integer to a string. 9. Logic error (bug) - ANSWER program runs but does the wrong thing 10. Any blank space or new line - ANSWER whitespace 11. = - ANSWER assigns a variable with a value 12. Increasing variables by a value of 1 - ANSWER incrementing 13. A number with a decimal point - ANSWER float( ) 14. Stub function - ANSWER A function that acts as a placeholder and returns a simple value so another function can be tested 15. Statement - ANSWER a program function. each statement appears as on its own line 16. Expression - ANSWER Any valid unit of code that resolves to a value. 17. Golf Scores - ANSWER Score names: 'Eagle' (2 less than par), 'Birdie' (1 less), 'Par' (equals par), 'Bogey' (1 more); 'Error' if par not 3, 4, or 5 18. Conditional Statements - ANSWER Used for multiple choices. 'if' for an option, 'elif' for alternatives, 'else' as the final option if none apply 19. For Loop - ANSWER Used to iterate a specific number of times or through elements in a list 20. While Loop - ANSWER Used to iterate until a condition is met, breaking based on a condition rather than a specific number of iterations 21. Nested Loops - ANSWER Loops within loops, used for complex iterations and operations 22. Nested Lists - ANSWER Lists within lists, used for organizing and managing complex data structures 23. Range Function - ANSWER Returns a sequence of numbers, commonly used in for loops 24. Smallest and Largest Numbers in a List - ANSWER Iterating through a list to find the smallest and largest values 25. Append - ANSWER Method to add elements to the end of a list 26. Break Statement - ANSWER Used to exit a loop based on a certain condition, instead of relying on the condition to become false 27. Reverse Binary - ANSWER Representing an integer in reverse binary by outputting remainders of division by 2 28. Create a solution that accepts an input identifying the name of a CSV file, for example, "". Each file contains two rows of comma-separated values. Import the built-in module csv and use its open() function and reader() method to create a dictionary of key:value pairs for each row of comma-separated values in the specified file. Output the file contents as two dictionaries. The solution output should be in the format {'key': 'value', 'key': 'value', 'key': 'value'} {'key': 'value', 'key': 'value', 'key': 'value'} - ANSWER import csv input1 = input() with open(input1, "r") as f: data = r(f) for row in data: even = [row[i].strip() for i in range(0, len(row), 2)] odd = [row[i].strip() for i in range(1, len(row), 2)] pair = dict(zip(even, odd)) print(pair) 29. Create a solution that accepts an integer input. Import the built-in module math and use its factorial() method to calculate the factorial of the integer input. Output the value of the factorial, as well as a Boolean value identifying whether the factorial output is greater than 100. The solution output should be in the format factorial_value Boolean_value - ANSWER import math num= int(input()) factorial_value = rial(num) print(factorial_value) if factorial_value &gt; 100: Boolean_value = True print(Boolean_value) else: Boolean_value = False

Show more Read less
Institution
WGU D335 Introduction To Programming In Python
Course
WGU D335 Introduction to Programming in Python











Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
WGU D335 Introduction to Programming in Python
Course
WGU D335 Introduction to Programming in Python

Document information

Uploaded on
June 2, 2025
Number of pages
31
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

WGU D335 Introduction to Programming in
Python OA ACTUAL EXAM 2025/2026 COMPLETE
QUESTIONS WITH CORRECT DETAILED ANSWERS ||
100% GUARANTEED PASS
<BRAND NEW VERSION>




1. A program consists of? - ANSWER ✔ input, process, output

2. A named item used to hold a value? - ANSWER ✔ variable

3. Syntaxes error - ANSWER ✔ a violation of the program language
rules on how symbols can be defined

4. Runtime error - ANSWER ✔ the program attempts an impossible
operation

5. Indentation error - ANSWER ✔ lines inside the program are not
properly indented

6. Value Error - ANSWER ✔ invalid value used

7. Name error - ANSWER ✔ The program tries to use a variable that
does not exist.

8. Type error - ANSWER ✔ An operation uses incorrect types - can
occur if adding an integer to a string.

,9. Logic error (bug) - ANSWER ✔ program runs but does the wrong
thing

10. Any blank space or new line - ANSWER ✔ whitespace

11. = - ANSWER ✔ assigns a variable with a value

12. Increasing variables by a value of 1 - ANSWER ✔
incrementing

13. A number with a decimal point - ANSWER ✔ float( )

14. Stub function - ANSWER ✔ A function that acts as a
placeholder and returns a simple value so another function can be
tested

15. Statement - ANSWER ✔ a program function. each statement
appears as on its own line

16. Expression - ANSWER ✔ Any valid unit of code that
resolves to a value.

17. Golf Scores - ANSWER ✔ Score names: 'Eagle' (2 less than
par), 'Birdie' (1 less), 'Par' (equals par), 'Bogey' (1 more); 'Error' if
par not 3, 4, or 5

18. Conditional Statements - ANSWER ✔ Used for multiple
choices. 'if' for an option, 'elif' for alternatives, 'else' as the final
option if none apply

19. For Loop - ANSWER ✔ Used to iterate a specific number of
times or through elements in a list

,20. While Loop - ANSWER ✔ Used to iterate until a condition is
met, breaking based on a condition rather than a specific number of
iterations

21. Nested Loops - ANSWER ✔ Loops within loops, used for
complex iterations and operations

22. Nested Lists - ANSWER ✔ Lists within lists, used for
organizing and managing complex data structures

23. Range Function - ANSWER ✔ Returns a sequence of
numbers, commonly used in for loops

24. Smallest and Largest Numbers in a List - ANSWER ✔
Iterating through a list to find the smallest and largest values

25. Append - ANSWER ✔ Method to add elements to the end of
a list

26. Break Statement - ANSWER ✔ Used to exit a loop based on
a certain condition, instead of relying on the condition to become
false

27. Reverse Binary - ANSWER ✔ Representing an integer in
reverse binary by outputting remainders of division by 2

28. Create a solution that accepts an input identifying the name
of a CSV file, for example, "input1.csv". Each file contains two
rows of comma-separated values. Import the built-in module csv
and use its open() function and reader() method to create a
dictionary of key:value pairs for each row of comma-separated
values in the specified file. Output the file contents as two
dictionaries.

, The solution output should be in the format
{'key': 'value', 'key': 'value', 'key': 'value'} {'key': 'value', 'key':
'value', 'key': 'value'} - ANSWER ✔ import csv
input1 = input()
with open(input1, "r") as f:
data = csv.reader(f)
for row in data:
even = [row[i].strip() for i in range(0, len(row), 2)]
odd = [row[i].strip() for i in range(1, len(row), 2)]
pair = dict(zip(even, odd))
print(pair)

29. Create a solution that accepts an integer input. Import the
built-in module math and use its factorial() method to calculate the
factorial of the integer input. Output the value of the factorial, as
well as a Boolean value identifying whether the factorial output is
greater than 100.
The solution output should be in the format
factorial_value Boolean_value - ANSWER ✔ import math
num= int(input())
factorial_value = math.factorial(num)
print(factorial_value)
if factorial_value > 100:
Boolean_value = True
print(Boolean_value)
else:
Boolean_value = False
print(Boolean_value)

30. Create a solution that accepts an integer input representing
the age of a pig. Import the existing module pigAge and use its
pre-built pigAge_converter() function to calculate the human
equivalent age of a pig. A year in a pig's life is equivalent to five

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.
BenjaminsStudyHub Teachme2-tutor
View profile
Follow You need to be logged in order to follow users or courses
Sold
12
Member since
7 months
Number of followers
0
Documents
248
Last sold
6 days ago
BENJAMIN STUDY HUB

Welcome to this platform! Here, you'll find a wide range of carefully curated study resources, including in-depth documents, all-inclusive bundles, and professionally designed flashcards—all provided by BenjaminsStudyHub. These materials are thoughtfully created to enhance your learning experience and help you prepare for exams with confidence and ease. I'm available to assist you with any academic questions or support you might need. Feel free to reach out—I'm always happy to help you succeed in your studies. Thank you for choosing these resources, and I wish you a productive and fulfilling learning journey!

Read more Read less
3.0

4 reviews

5
0
4
1
3
2
2
1
1
0

Recently viewed by you

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

Frequently asked questions