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

WGU E010 Foundations of Programming (Python) OA Final Exam | Complete Exam with Actual Questions & Correct Verified Answers (Rationales Included) | Latest Update 2026/2027 – Already Graded A+

Document preview thumbnail
Preview 4 out of 48 pages

WGU E010 Foundations of Programming (Python) OA Final Exam | Complete Exam with Actual Questions & Correct Verified Answers (Rationales Included) | Latest Update 2026/2027 – Already Graded A+

Content preview

WGU E010 Foundations of Programming (Python)
OA Final Exam | Complete Exam with Actual
Questions & Correct Verified Answers (Rationales
Included) | Latest Update 2026/2027 – Already
Graded A+


SECTION 1: BASIC SYNTAX & DATA TYPES
Question 1
What is the correct output of print("Hello, World!")?
A) "Hello, World!"
B) Hello, World!
C) print("Hello, World!")
D) An error occurs
Answer: B
Rationale: The print() function outputs the string literal to the console without the
quotation marks. The quotes are used only to denote the string in the code .


Question 2
Which symbol begins a single-line comment in Python?
A) // (double forward slash)
B) # (pound symbol)
C) * (asterisk)
D) % (percent symbol)
Answer: B

,Rationale: The hash character # indicates a single-line comment in Python.
Everything after it on the same line is ignored by the interpreter .


Question 3
Which of the following is a valid variable name in Python?
A) 2ndName
B) my-name
C) my_name
D) class
Answer: C
Rationale: Python variable names cannot start with a digit (eliminating 2ndName),
cannot contain hyphens (eliminating my-name), and cannot be reserved keywords
like class (eliminating class). Underscores are allowed and commonly used, so
my_name is valid .


Question 4
Which data type is the value 3.14 in Python?
A) Integer
B) Float
C) String
D) Boolean
Answer: B
Rationale: Numbers with a decimal point are of type float (floating-point). Integers
have no decimal point .


Question 5

,What is the output of print(type())?
A) <class 'int'>
B) <class 'float'>
C) <class 'double'>
D) <class 'str'>
Answer: B
Rationale: In Python, the / operator performs true division and always returns a
float, even when the numbers divide evenly. = 5.0, so type(5.0) returns float.
Python does not have a separate double type .


Question 6
Which data type is immutable?
A) list
B) dict
C) set
D) tuple
Answer: D
Rationale: A tuple cannot be changed after creation (immutable). Lists,
dictionaries, and sets are mutable data types that can be modified after creation .


Question 7
What will the following code print?
python
x = "Hello"
print(x[1])

, A) H
B) e
C) l
D) o
Answer: B
Rationale: String indexing in Python starts at 0. Index 0 is 'H', index 1 is 'e'. The
code prints the character at index 1, which is 'e' .


Question 8
What is the output of print(2 ** 3)?
A) 6
B) 8
C) 9
D) 5
Answer: B
Rationale: The ** operator is the exponentiation operator. 2 ** 3 means 2 raised
to the power of 3, which equals 8 .


Question 9
What is the result of 10 // 3?
A) 3.33
B) 3
C) 4
D) 3.5
Answer: B
Rationale: The floor division operator // returns the integer quotient (discards
remainder). 10 // 3 = 3 .

Document information

Uploaded on
August 27, 2026
Number of pages
48
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$30.99

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.
StudyVaultPro1
5.0
(1)
Sold
17
Followers
1
Items
3051
Last sold
2 days 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