WGU Foundations-of-Programming-Python Actual Free Exam Questions & Community Discussion

  • Exam Code/Number: Foundations-of-Programming-Python
  • Exam Name/Title: Foundations of Programming (Python) - E010 JIV1
  • Certification Provider: WGU
  • Corresponding Certification: Courses and Certificates
  • Exam Questions: 62
  • Updated On: May 30, 2026
Modify the function greet_with_default(name) by adding a default value of " World " to the name parameter so it can be called with or without an argument.
def greet_with_default(name):
# TODO: Add a default value of " World " to the name parameter
return " Hello " + name
Correct Answer:
See the Step by Step Solution below in Explanation.
Explanation:
Step 1: A default parameter value allows a function to be called even when no argument is provided.
Step 2: The default value should be added in the function header.
Step 3: The parameter name should have the default value " World " .
Correct code:
def greet_with_default(name= " World " ):
return " Hello " + name
Example:
print(greet_with_default())
print(greet_with_default( " Alice " ))
Output:
Hello World
Hello Alice
Which data type is the value 3.14 in Python?
Correct Answer: C Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
Which Python data structure contains only unique elements and does not support indexing?
Correct Answer: C Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
What happens when theRunbutton is clicked in a Python development environment?
Correct Answer: B Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
Which for loop correctly iterates through a list of student names?
Correct Answer: B Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
In Python, what must follow the in keyword in a for loop?
Correct Answer: B Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
What does the string method ' ' .join() return when applied to the list [ ' Hello ' , ' World ' ]?
Correct Answer: D Vote an answer
0
0
0
10