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

WGU E010 FOUNDATIONS OF PROGRAMMING (PYTHON ) ACTUAL EXAM QUESTIONS AND CORRECT ANSWERS LATEST 2026 .

Document preview thumbnail
Preview 4 out of 131 pages

WGU E010 FOUNDATIONS OF PROGRAMMING (PYTHON ) ACTUAL EXAM QUESTIONS AND CORRECT ANSWERS LATEST 2026 .

Content preview

1



WGU E010 FOUNDATIONS OF PROGRAMMING (PYTHON
) ACTUAL EXAM QUESTIONS AND CORRECT ANSWERS
LATEST 2026 .



Question 1: Data Types
What is the output of print(type(10/2))?
A. <class 'int'>
B. <class 'float'>
C. <class 'str'>
D. <class 'bool'>
Correct Answer: B – <class 'float'>
Rationale: In Python 3, the / operator always returns a float, even when the result
is a whole number.


Question 2: Operators
What is the result of print(10 // 3)?
A. 3.33
B. 3
C. 4
D. 3.0
Correct Answer: B – 3
Rationale: The // operator performs floor division, returning the integer quotient
rounded down to the nearest whole number.


Question 3: Data Types



pg. 1

,2


Which data type is immutable in Python?
A. List
B. Dictionary
C. Tuple
D. Set
Correct Answer: C – Tuple
Rationale: Tuples are immutable, meaning they cannot be changed after creation.
Lists, dictionaries, and sets are mutable.


Question 4: String Slicing
How can the first four characters be extracted from the string 'computer'?
A. 'computer'[0:4]
B. 'computer'[:4]
C. 'computer'[1:4]
D. Both A and B
Correct Answer: D – Both A and B
Rationale: Both 'computer'[0:4] and 'computer'[:4] will return 'comp'.


Question 5: Basic Syntax
What is the output of the following code?
python
x=5
y = 10
print(x + y)
A. 510
B. 15




pg. 2

,3


C. Error
D. 5 10
Correct Answer: B – 15
Rationale: The + operator performs addition on integers, returning 15.


Question 6: For Loops
What must follow the in keyword in a for loop when iterating a specific number of
times?
A. A list
B. A range
C. A string
D. A dictionary
Correct Answer: B – A range
Rationale: The range() function is used to generate a sequence of numbers for
iteration in a for loop.


Question 7: Code Output
What is the correct output of the following code?
python
print("Hello, World!")
A. Hello, World!
B. "Hello, World!"
C. Error
D. Hello
Correct Answer: A – Hello, World!
Rationale: The print() function outputs the string without the quotation marks.




pg. 3

, 4


Question 8
What is the output of print(type())?
A. <class 'int'>
B. <class 'float'>
C. <class 'str'>
D. <class 'bool'>
Correct Answer: B – <class 'float'>
Rationale: In Python 3, the / operator always returns a float, even when the result
is a whole number.


Question 9
What is the result of print(10 // 3)?
A. 3.33
B. 3
C. 4
D. 3.0
Correct Answer: B – 3
Rationale: The // operator performs floor division, returning the integer quotient
rounded down to the nearest whole number.


Question 10
Which of the following data types is immutable in Python?
A. List
B. Dictionary
C. Tuple
D. Set
Correct Answer: C – Tuple



pg. 4

Document information

Uploaded on
August 21, 2026
Number of pages
131
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$23.69

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.
NursingTotur2
3.3
(87)
Sold
606
Followers
39
Items
6259
Last sold
13 hours 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