• 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 3 out of 29 pages
Exam (elaborations)

WGU D522 V2 Task 1 & 2 Performance Assessment Exam with verified answers and rationale graded A+ updated 2026 new!!

Document preview thumbnail
Preview 3 out of 29 pages

WGU D522 V2 Task 1 & 2 Performance Assessment Exam with verified answers and rationale graded A+ updated 2026 new!!

Content preview

WGU D522 V2 Task 1 & 2
Performance Assessment Exam
with verified answers and
rationale graded A+ updated 2026
new!!

Section 1: Python Fundamentals (Questions 1–20)
1. What is the output of the following code?
python
Copy
Download
print("5" + "3")

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

Correct Answer: B

Rationale: String concatenation joins the two strings "5" and "3" to produce "53".
The + operator performs concatenation when both operands are strings, not
arithmetic addition -3 .

2. Which data type is immutable in Python?

A. List
B. Dictionary
C. Tuple
D. Set

Correct Answer: C

Rationale: Tuples are ordered and unchangeable (immutable). Lists, dictionaries, and
sets are mutable data structures whose contents can be modified after creation -7-
14 .

3. What does len("Hello") return?

,A. 4
B. 5
C. 6
D. Error

Correct Answer: B

Rationale: The len() function returns the number of characters in a string. The string
"Hello" contains five characters: H, e, l, l, o -3-14 .

4. Which method converts all characters in a string to uppercase?

A. capitalize()
B. casefold()
C. swapcase()
D. upper()

Correct Answer: D

Rationale: The .upper() method converts all alphabetic characters in a string to
uppercase -3 .

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

A. 6
B. 8
C. 9
D. 12

Correct Answer: C

Rationale: The ** operator in Python performs exponentiation. Thus, 3 ** 2 is
equivalent to 3 raised to the power of 2, which equals 9 -14 .

6. Which keyword is used to define a function in Python?

A. func
B. def
C. function
D. define

Correct Answer: B

Rationale: Functions in Python are defined using the def keyword followed by the
function name and parentheses -1-3 .

, 7. What will be the result of the expression 5 + 3 * 2?

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

Correct Answer: C

Rationale: Python follows standard operator precedence rules. The multiplication
operator (*) has higher precedence than addition (+), so 3 * 2 is evaluated first to yield
6, and then 5 + 6 results in 11 -14 .

8. What is the output of the following code?
python
Copy
Download
x = [1, 2, 3]
x.append(4)
print(x)

A. [1, 2, 3]
B. [4, 1, 2, 3]
C. [1, 2, 3, 4]
D. [1, 2, 3][4]

Correct Answer: C

Rationale: The append() method adds an item to the end of a list. After appending 4,
the list becomes [1, 2, 3, 4] -3 .

9. What is the purpose of the strip() method?

A. Removes leading and trailing whitespace
B. Removes all spaces from a string
C. Splits a string into a list
D. Converts a string to lowercase

Correct Answer: A

Rationale: The strip() method removes leading and trailing whitespace from a string.
This is a common operation when processing user input or reading data from files -1 .

10. Which of the following is used for string formatting in Python?

Document information

Uploaded on
September 15, 2026
Number of pages
29
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$24.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

Sold
0
Followers
0
Items
227
Last sold
-



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