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
Exam (elaborations)

WGU E010 Foundations of Programming Python OA Actual Exam 2026/2027 | 100 Questions & Answers with Detailed Rationales | Pass Guaranteed – A+ Graded

Rating
-
Sold
-
Pages
42
Grade
A+
Uploaded on
28-06-2026
Written in
2025/2026

WGU E010 Foundations of Programming Python Actual Exam 2026/2027 – Real-Style Objective Assessment Questions | 100% Correct Answers | Python Syntax | Data Structures | Control Flow | Functions & Modules | Object-Oriented Programming | Detailed Rationales | Graded A+ Verified – Pass Guaranteed – Instant Download

Show more Read less
Institution
WGU E010 Foundations Of Programming
Course
WGU E010 Foundations of Programming

Content preview

WGU E010 Foundations of Programming Python OA
Actual Exam 2026/2027 | 100 Questions & Answers with
Detailed Rationales | Pass Guaranteed – A+ Graded



Section 1: Python Basics – Variables, Data Types & Operators

Q1: A student writes the following assignment: x = 42. What is the data type of x in
Python?
A. float
B. str
C. int [CORRECT]
D. bool
Correct Answer: C
Rationale: The best answer is C. When you assign a whole number without quotes or a
decimal point, Python treats it as an integer type. What you'll want to remember for the
OA is that Python automatically infers the data type based on how the value is written,

so 42 is always an int.


Q2: Which of the following expressions correctly converts the string "3.14" to a
floating-point number?
A. str("3.14")
B. float("3.14") [CORRECT]
C. int("3.14")
D. bool("3.14")
Correct Answer: B
Rationale: The best answer is B. The float() function is the standard way to convert a

string representation of a decimal number into a floating-point value. This aligns with

Python's standard library documentation which states that float() accepts string

input and returns the corresponding float.

,Q3: What is the output of print(10 // 3)?
A. 3.33
B. 3 [CORRECT]
C. 1
D. 3.0
Correct Answer: B
Rationale: The best answer is B. The floor division operator // returns the largest whole

number less than or equal to the division result, so 10 // 3 gives 3 without any

remainder. This is different from regular division / which would give you 3.333....


Q4: A developer needs to check if two variables, a and b, are not equal. Which operator
should they use?
A. =
B. ==
C. != [CORRECT]
D. <>
Correct Answer: C
Rationale: The best answer is C. In Python, the != operator is the standard "not equal"

comparison operator. What you'll want to remember for the OA is that Python does not

use <> like some other languages; stick with != for inequality checks.


Q5: What is the result of 5 + 3 * 2 in Python?
A. 16
B. 11 [CORRECT]
C. 13
D. 10
Correct Answer: B
Rationale: The best answer is B. Python follows standard operator precedence, so

multiplication happens before addition: 3 * 2 is 6, then 5 + 6 equals 11. If you

wanted 16, you'd need parentheses around 5 + 3.


Q6: Which of the following is a valid variable name in Python?
A. 2nd_value

,B. second value
C. _second_value [CORRECT]
D. second-value
Correct Answer: C
Rationale: The best answer is C. Variable names in Python can start with an underscore
or a letter, but never with a number, and they cannot contain spaces or hyphens. The
underscore is perfectly valid and is actually commonly used for internal or private
variables.


Q7: What is the output of print(3 ** 2)?
A. 6
B. 9 [CORRECT]
C. 5
D. 32
Correct Answer: B
Rationale: The best answer is B. The ** operator is Python's exponentiation operator, so

3 ** 2 means three squared, which equals nine. Don't confuse this with ^, which is the

bitwise XOR operator in Python, not exponentiation.


Q8: A programmer writes name = "Alice". What built-in function returns the data
type of name?
A. type(name) [CORRECT]
B. str(name)
C. dtype(name)
D. typeof(name)
Correct Answer: A
Rationale: The best answer is A. The type() function is the built-in way to determine

the data type of any object in Python. This aligns with Python's standard library

documentation which states that type() returns the object's type.


Q9: What is the result of bool("") in Python?
A. True
B. False [CORRECT]

, C. None
D. Error
Correct Answer: B
Rationale: The best answer is B. An empty string evaluates to False in a boolean

context because Python considers empty sequences as falsy values. What you'll want

to remember for the OA is that empty strings, empty lists, 0, and None all evaluate to

False.


Q10: Which expression correctly evaluates to True?
A. 5 > 10
B. 5 == 5 [CORRECT]
C. 5 != 5
D. 5 < 5
Correct Answer: B
Rationale: The best answer is B. The equality operator == checks if two values are

equal, so 5 == 5 is naturally True. The other options all describe inequalities or

incorrect comparisons that would evaluate to False.


Q11: What is the output of print("10" + "20")?
A. 30
B. "1020" [CORRECT]
C. Error
D. "30"
Correct Answer: B
Rationale: The best answer is B. When you use the + operator with strings, Python

performs concatenation rather than mathematical addition, so "10" and "20" are

joined together to make "1020". If you wanted 30, you'd need to convert them to

integers first.


Q12: A student needs to find the remainder when 17 is divided by 5. Which operator
should they use?
A. /

Written for

Institution
WGU E010 Foundations of Programming
Course
WGU E010 Foundations of Programming

Document information

Uploaded on
June 28, 2026
Number of pages
42
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$14.99
Get access to the full document:

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

Get to know the seller
Seller avatar
CLEARVISION

Get to know the seller

Seller avatar
CLEARVISION Rasmussen College
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 month
Number of followers
0
Documents
64
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions