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: Aug 13, 2026
Complete the function double_number(num) that takes one number parameter and returns double that number.
For example, double_number(5) should return 10.
def double_number(num):
# TODO: Return double the input number
# Example: double_number(5) should return 10
pass
Correct Answer:
See the Step by Step Solution below in Explanation.
Explanation:
Step 1: The function receives one parameter named num.
Step 2: To double a number, multiply it by 2.
Step 3: The function should return the result using the return statement.
Correct code:
def double_number(num):
return num * 2
Example:
print(double_number(5))
Output:
10
Write a complete function word_count(text) that counts and returns the number of words in the given text.
Words are separated by spaces.
For example, word_count( " Hello world Python " ) should return 3.
def word_count(text):
# TODO: Count and return the number of words in text
pass
Correct Answer:
See the Step by Step Solution below in Explanation.
Explanation:
Step 1: The function receives one string parameter named text.
Step 2: Since words are separated by spaces, use the .split() method to split the string into a list of words.
Step 3: Use len() to count how many items are in the list.
Step 4: Return that count.
Correct code:
def word_count(text):
return len(text.split())
Example:
print(word_count( " Hello world Python " ))
Output:
3
Which components are required in every Python for loop?
Correct Answer: D Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
Which data type does the expression 5 > 3 evaluate to in Python?
Correct Answer: B Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
In the code for item in my_list:, what does item represent?
Correct Answer: D Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
Which punctuation mark must appear at the end of an if statement line?
Correct Answer: B Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
How can the first four characters be extracted from the string ' computer ' ?
Correct Answer: B Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
0
0
0
10