• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 77 pages
Exam (elaborations)

WGU E010 Foundations of Programming (Python) Objective Assessment | OA V1 and V2 | 200 Practice Questions and Answers | 2026 Study Guide | 100% Correct.

Document preview thumbnail
Preview 4 out of 77 pages

WGU E010 Foundations of Programming (Python) Objective Assessment | OA V1 and V2 | 200 Practice Questions and Answers | 2026 Study Guide | 100% Correct.

Content preview

WGU E010 Foundations of Programming (Python) Objective Assessment | OA V1 and V2 |
200 Practice Questions and Answers | 2026 Study Guide | 100% Correct.


Questions 1–20: Python Foundations and Data Types
1. Which statement correctly assigns the integer 25 to a variable?

A. 25 = age
B. age == 25
C. age = 25
D. int age = 25

Answer: C

Rationale: Python uses the assignment operator = to store a value in a variable. Python does not
require a type declaration such as int.



2. What is the data type of result?
result =

A. int
B. float
C. str
D. bool

Answer: B

Rationale: The / operator always performs floating-point division in Python 3. The result is 5.0,
which is a float.



3. What does the following code display?
print(type("42"))

A. <class 'int'>
B. <class 'float'>
C. <class 'str'>
D. 42

,Answer: C

Rationale: Quotation marks create a string. Although the characters represent a number, "42"
has the str data type.



4. Which variable name is valid in Python?

A. 2total
B. total-cost
C. class
D. total_cost

Answer: D

Rationale: Variable names can contain letters, digits, and underscores, but cannot begin with a
digit or use a reserved keyword. A hyphen is interpreted as subtraction.



5. What is displayed?
x = 7
y = 2
print(x // y)

A. 3
B. 3.5
C. 4
D. 1

Answer: A

Rationale: // performs floor division. It returns the whole-number quotient after rounding
down, so 7 // 2 is 3.



6. What is the value of remainder?
remainder = 17 % 5

A. 2
B. 3

,C. 3.4
D. 12

Answer: A

Rationale: The modulo operator % returns the remainder. Dividing 17 by 5 produces a remainder
of 2.



7. What does 2 ** 4 evaluate to?

A. 6
B. 8
C. 16
D. 24

Answer: C

Rationale: ** is the exponentiation operator. Therefore, 2 ** 4 means (2^4), which equals 16.



8. Which function converts "3.75" to a floating-point value?

A. int("3.75")
B. float("3.75")
C. str("3.75")
D. bool("3.75")

Answer: B

Rationale: float() converts a compatible numeric string into a floating-point number.



9. What does the following code display?
value = int(8.9)
print(value)

A. 8
B. 9
C. 8.9
D. An error

, Answer: A

Rationale: Converting a float to an integer removes the fractional portion. It does not round the
number.



10. What is displayed?
first = "Cloud"
second = "Computing"
print(first + " " + second)

A. CloudComputing
B. Cloud Computing
C. Cloud + Computing
D. An error

Answer: B

Rationale: The + operator concatenates strings. The separate " " string inserts a space.



11. Which value is Boolean?

A. "False"
B. 0.0
C. False
D. "True"

Answer: C

Rationale: False without quotation marks is a Boolean literal. Values inside quotation marks
are strings.



12. What is the result of this expression?
5 + 3 * 2

A. 16
B. 11
C. 13
D. 10

Document information

Uploaded on
August 1, 2026
Number of pages
77
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$19.39

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.
Wiseman
3.9
(1672)
Sold
8452
Followers
3907
Items
31205
Last sold
1 hour 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