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

WGU E010 Foundations of Programming (Python) – 2026 UPDATED OA 100 Questions & Answers GUARANTEED PASS Study Guide..pdf

Document preview thumbnail
Preview 4 out of 159 pages

WGU E010 Foundations of Programming (Python) – 2026 UPDATED OA 100 Questions & Answers GUARANTEED PASS Study Guide..pdf

Content preview

WGU E010 Foundations of Programming
(Python) – 2026 UPDATED OA 100
Questions & Answers GUARANTEED
PASS Study Guide.
1. Which symbol begins a single-line comment in Python?

A. //
B. #
C. <!--
D. /*

Answer: B. #

Rationale: Python uses # to indicate that the remainder of the line is a comment.



2. What is the output?

x=5

y=3

print(x + y)

A. 2
B. 8
C. 15
D. 53

Answer: B. 8

Rationale: The + operator performs numeric addition when both operands are integers.



3. Which is a valid Python variable name?

A. 2value
B. my-value

,C. my_value
D. class

Answer: C. my_value

Rationale: Variable names cannot begin with a digit or contain a hyphen. Python keywords such
as class cannot be used as ordinary variable names.



4. What data type is produced by the following expression?

x = 10

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

Answer: C. int

Rationale: 10 is an integer literal.



5. Which function displays output to the screen?

A. input()
B. display()
C. output()
D. print()

Answer: D. print()

Rationale: Python's built-in print() function sends values to standard output.



6. What does input() normally return?

A. An integer
B. A Boolean
C. A string
D. A list

Answer: C. A string

,Rationale: User input is returned as a string unless it is explicitly converted to another type.



7. What is the result?

x = "5"

y = "2"

print(x + y)

A. 7
B. 52
C. 10
D. Error

Answer: B. 52

Rationale: Both values are strings, so + concatenates them.



8. Which function converts a string to an integer when possible?

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

Answer: C. int()

Rationale: int("25") produces the integer 25.



9. What is the output?

print()

A. 5
B. 5.0
C. 10
D. 2

Answer: B. 5.0

Rationale: / performs true division and returns a floating-point result.

, 10. Which operator performs floor division?

A. /
B. %
C. //
D. **

Answer: C. //

Rationale: // divides and rounds the result down to the nearest integer boundary.



11. What is 17 % 5?

A. 2
B. 3
C. 5
D. 12

Answer: A. 2

Rationale: % returns the remainder after division. Seventeen divided by five leaves a remainder
of two.



12. Which operator calculates an exponent?

A. ^
B. **
C. //
D. %%

Answer: B. **

Rationale: Python uses ** for exponentiation.



13. What is the value of 2 ** 3?

A. 5
B. 6

Document information

Uploaded on
October 4, 2026
Number of pages
159
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
CA$27.08

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.
GradeAchiver
2.3
(4)
Sold
40
Followers
2
Items
3512
Last sold
1 day 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