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

WGU C960 – Discrete Mathematics II Objective Assessment Review | Full Questions, Correct Answers, and Worked Solutions | 2026 Update | 100% Correct.

Document preview thumbnail
Preview 4 out of 50 pages

WGU C960 – Discrete Mathematics II Objective Assessment Review | Full Questions, Correct Answers, and Worked Solutions | 2026 Update | 100% Correct.

Content preview

WGU C960 – Discrete Mathematics II
Objective Assessment Review | Full
Questions, Correct Answers, and Worked
Solutions | 2026 Update | 100% Correct.



SECTION 1: ALGORITHMS & ALGORITHM ANALYSIS




Question 1

What is the final value of abs after the following pseudocode is run?

text
x := 2
If (x > 0)
abs := x
Else
abs := -x
End-if


A) -2
B) 0
C) 2
D) 4

Answer: C

,Rationale: The condition (x > 0) evaluates to true because x = 2. The line abs := x is
executed, assigning the value 2 to abs. The Else branch is skipped entirely.




Question 2

What is the final value of abs after the following pseudocode is run?

text
x := -2
If (x > 0)
abs := x
Else
abs := -x
End-if


A) -2
B) 0
C) 2
D) 4

Answer: C

Rationale: The condition (x > 0) evaluates to false because x = -2. The Else branch is
executed, and abs := -x evaluates to -(-2) = 2.




Question 3

What is the final value of product after the following loop completes?

text
product := 1

,count := 5
While (count > 0)
product := product * count
count := count - 2
End-while


A) 3
B) 5
C) 15
D) 30

Answer: C

Rationale: First iteration: count = 5, product = 1 × 5 = 5, count becomes 3. Second
iteration: count = 3, product = 5 × 3 = 15, count becomes 1. Third iteration: count = 1,
product = 15 × 1 = 15, count becomes -1. The loop stops. Final product = 15.




Question 4

How many iterations does the loop in Question 3 execute?
A) 1
B) 2
C) 3
D) 4

Answer: C

Rationale: Count values: 5, 3, 1. Each time count > 0, the loop executes. When count
becomes -1, the condition count > 0 is false. The loop executes 3 iterations.

, Question 5

What is the worst-case time complexity of a nested loop where the outer loop runs n
times and the inner loop runs n times?
A) O(n)
B) O(n log n)
C) O(n²)
D) O(2ⁿ)

Answer: C

Rationale: A nested loop with both loops running n times has O(n²) time complexity.
This is a classic quadratic growth pattern. Total iterations = n × n = n².




Question 6

What is the asymptotic behavior of f(n) = 5n + 12?
A) n
B) 5n
C) 12
D) n²

Answer: A

Rationale: Drop the constant multiplier 5 and the constant term 12. The fastest-growing
term is n. Therefore, f(n) = Θ(n).




Question 7

Document information

Uploaded on
July 18, 2026
Number of pages
50
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$29.49

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
7
Followers
2
Items
671
Last sold
4 weeks 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