WGU E010 Foundations of Programming (Python) – 2026 UPDATED OA |
100 Questions & Answers | GUARANTEED PASS Study Guide.
🔹 SECTION 1: Python Basics (Q1–20)
1. What is the correct way to print text in Python?
A. echo("Hello")
B. print("Hello")
C. display("Hello")
D. write("Hello")
Answer: B
2. Which data type is used for whole numbers?
A. float
B. str
C. int
D. bool
Answer: C
3. What is the output of: print(type(10))?
A. int
B. <class 'int'>
C. number
D. integer
Answer: B
4. Which symbol is used for comments in Python?
A. //
B. #
C. /* */
D. --
Answer: B
5. What is the result of 3 + 2 * 2?
A. 10
B. 7
C. 8
,D. 12
Answer: B
6. Which keyword is used to define a function?
A. func
B. define
C. def
D. function
Answer: C
7. Which of the following is a valid variable name?
A. 2name
B. name_1
C. name-1
D. name 1
Answer: B
8. What is the output of: print("Hi" * 3)?
A. HiHiHi
B. Hi 3
C. Error
D. HiHi
Answer: A
9. Which type represents True/False values?
A. int
B. str
C. bool
D. float
Answer: C
10. What is the output of: print()?
A. 5
B. 5.0
C. 2
,D. Error
Answer: B
11. Which function converts a string to integer?
A. str()
B. int()
C. float()
D. bool()
Answer: B
12. What is Python?
A. Hardware
B. Programming language
C. Operating system
D. Database
Answer: B
13. What is the output of: print(5 == 5)?
A. True
B. False
C. Error
D. 5
Answer: A
14. What does len("abc") return?
A. 2
B. 3
C. 4
D. Error
Answer: B
15. What is the output of: print(2 ** 3)?
A. 6
B. 8
C. 9
, D. 5
Answer: B
16. Which is a string?
A. 123
B. "123"
C. True
D. 12.3
Answer: B
17. What is indentation used for in Python?
A. Comments
B. Code structure
C. Variables
D. Printing
Answer: B
18. Which operator checks equality?
A. =
B. ==
C. !=
D. >=
Answer: B
19. What is the output of: print("A" + "B")?
A. AB
B. A B
C. Error
D. A+B
Answer: A
20. Which keyword is used to get input from user?
A. read()
B. input()
C. scan()
100 Questions & Answers | GUARANTEED PASS Study Guide.
🔹 SECTION 1: Python Basics (Q1–20)
1. What is the correct way to print text in Python?
A. echo("Hello")
B. print("Hello")
C. display("Hello")
D. write("Hello")
Answer: B
2. Which data type is used for whole numbers?
A. float
B. str
C. int
D. bool
Answer: C
3. What is the output of: print(type(10))?
A. int
B. <class 'int'>
C. number
D. integer
Answer: B
4. Which symbol is used for comments in Python?
A. //
B. #
C. /* */
D. --
Answer: B
5. What is the result of 3 + 2 * 2?
A. 10
B. 7
C. 8
,D. 12
Answer: B
6. Which keyword is used to define a function?
A. func
B. define
C. def
D. function
Answer: C
7. Which of the following is a valid variable name?
A. 2name
B. name_1
C. name-1
D. name 1
Answer: B
8. What is the output of: print("Hi" * 3)?
A. HiHiHi
B. Hi 3
C. Error
D. HiHi
Answer: A
9. Which type represents True/False values?
A. int
B. str
C. bool
D. float
Answer: C
10. What is the output of: print()?
A. 5
B. 5.0
C. 2
,D. Error
Answer: B
11. Which function converts a string to integer?
A. str()
B. int()
C. float()
D. bool()
Answer: B
12. What is Python?
A. Hardware
B. Programming language
C. Operating system
D. Database
Answer: B
13. What is the output of: print(5 == 5)?
A. True
B. False
C. Error
D. 5
Answer: A
14. What does len("abc") return?
A. 2
B. 3
C. 4
D. Error
Answer: B
15. What is the output of: print(2 ** 3)?
A. 6
B. 8
C. 9
, D. 5
Answer: B
16. Which is a string?
A. 123
B. "123"
C. True
D. 12.3
Answer: B
17. What is indentation used for in Python?
A. Comments
B. Code structure
C. Variables
D. Printing
Answer: B
18. Which operator checks equality?
A. =
B. ==
C. !=
D. >=
Answer: B
19. What is the output of: print("A" + "B")?
A. AB
B. A B
C. Error
D. A+B
Answer: A
20. Which keyword is used to get input from user?
A. read()
B. input()
C. scan()