Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 4 out of 59 pages
Exam (elaborations)

WGU E010 FOUNDATIONS OF PROGRAMMING (PYTHON) – 2026 UPDATED OA | 150+ PRACTICE QUESTIONS & ANSWERS | ULTIMATE EXAM PREP & STUDY GUIDE | PYTHON FUNDAMENTALS, PROGRAMMING CONCEPTS, CODING PRACTICE & DETAILED EXPLANATIONS | COMPREHENSIVE OBJECTIVE AS

Document preview thumbnail
Preview 4 out of 59 pages

WGU E010 Foundations of Programming (Python) 2026 Study Guide featuring 150+ practice questions with detailed answers and explanations. Covers Python fundamentals, programming concepts, variables, data types, operators, conditional logic, loops, functions, collections, coding practice, debugging, problem-solving, and foundational programming principles. Designed for Objective Assessment (OA) preparation with high-yield topics, exam-style practice, detailed answer rationales, and comprehensive E010 review material.

Content preview

WGU E010 FOUNDATIONS OF PROGRAMMING (PYTHON) – 2026
UPDATED OA | 150+ PRACTICE QUESTIONS & ANSWERS | ULTIMATE
EXAM PREP & STUDY GUIDE | PYTHON FUNDAMENTALS,
PROGRAMMING CONCEPTS, CODING PRACTICE & DETAILED
EXPLANATIONS | COMPREHENSIVE OBJECTIVE ASSESSMENT REVIEW |
HIGH-YIELD TOPICS, EXAM-STYLE QUESTIONS & ANSWER RATIONALES |
IN-DEPTH REVISION MATERIAL | BOOST YOUR CONFIDENCE & PREPARE
TO PASS!
Question 1: What is the correct way to create a variable named age with the value
25 in Python

A) age == 25

• B) age := 25

• C) age = 25
• D) int age = 25

Answer: C) age = 25

Rationale: Python uses the assignment operator = to assign values to variables. == is a
comparison operator, := is the walrus operator used in expressions, and int age = 25 is
invalid Python syntax .




Question 2: Which of the following is a valid variable name in Python?

• A) 2nd_place
• B) my-variable
• C) _private_var
• D) class

Answer: C) _private_var

,Rationale: Variable names can start with a letter or underscore ( _), followed by letters,
numbers, or underscores. They cannot start with a digit (eliminating A), cannot contain
hyphens (eliminating B), and cannot be reserved keywords like class (eliminating D) .




Question 3: What is the data type of the value 3.14 in Python?

• A) Integer
• B) Float
• C) String
• D) Boolean

Answer: B) Float

Rationale: Any number with a decimal point is a floating-point number (float) in Python.
Integers (int) are whole numbers without a decimal point .




Question 4: What is the output of type()?

• A) <class 'int'>
• B) <class 'float'>
• C) <class 'str'>
• D) <class 'bool'>

Answer: B) <class 'float'>

Rationale: In Python, the / operator always returns a float, even when the result is a
whole number. evaluates to 5.0, which is a float .




Question 5: Which function converts the string "123" to an integer?

• A) str("123")
• B) int("123")
• C) float("123")

, • D) bool("123")

Answer: B) int("123")

Rationale: The int() function converts a value to an integer. "123" is a string containing
digits, so it can be successfully converted to the integer 123 .




Question 6: What is the output of bool(0)?

• A) True
• B) False
• C) 0
• D) None

Answer: B) False

Rationale: In Python, 0 is considered False when converted to a Boolean. Any non-zero
number (positive or negative) is considered True .




Question 7: What is the output of bool("") (empty string)?

• A) True
• B) False
• C) ""
• D) Error

Answer: B) False

Rationale: An empty string is considered False in a Boolean context. Non-empty strings
are considered True .




Question 8: What happens when you run int("3.14")?

, • A) Returns 3
• B) Returns 3.14
• C) Returns "3.14"
• D) Raises a Value Error

Answer: D) Raises a ValueError

Rationale: int() can only convert strings that represent whole numbers. "3.14" contains a
decimal point, so Python raises a ValueError .




Question 9: What is the output of print(type("Hello"))?

• A) <class 'str'>
• B) <class 'int'>
• C) <class 'float'>
• D) <class 'bool'>

Answer: A) <class 'str'>

Rationale: The type() function returns the data type of the argument. "Hello" is a string
(str), which is a sequence of characters enclosed in quotes .




Question 10: What is the output of print("5" + "3")?

• A) 8
• B) 53
• C) Error
• D) 5 3

Answer: B) 53

Rationale: String concatenation joins strings. "5" + "3" results in "53" because both
operands are strings. If you wanted numeric addition, you would need to convert them to
integers first .

Document information

Uploaded on
August 11, 2026
Number of pages
59
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$28.49

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.
Doctordih
4.9
(486)
Sold
80
Followers
41
Items
1803
Last sold
1 week 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