Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 4 fuera de 195 páginas
Examen

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

Document preview thumbnail
Vista previa 4 fuera de 195 páginas

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

Vista previa del contenido

WGU C960 OA– Discrete Mathematics II
Objective Assessment Review | Full Questions,
Correct Answers, and Worked Solutions | Latest
2026/2027 Update | 100% Correct.
Question:

1.4.3: If-else-statement i,-




1)
What is the value of abs after the following lines of code are run?
i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,-




x := 2i,- i,- i,-




If ( x > 0 )
i,- i,- i,- i,- i,- i,-




i,- abs := x i,- i,- i,-




Else abs := -x i,- i,- i,- i,-




End-if?

Answer:
2

The condition ( x > 0 ) evaluates to true because the value of x is 2. The
i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,-



line abs := x is executed and the line abs := -x is skipped. Therefore the
i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,-


final value of abs is 2.
i,- i,- i,- i,- i,-




Question:

,1.4.3: If-else-statement i,-




2)

What is the value of abs after the following lines of code are run?
i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,-




x := -2
i,- i,- i,-




If ( x > 0 )
i,- i,- i,- i,- i,- i,-




i,- abs := x i,- i,- i,-




Else i,-




i,- abs := -x i,- i,- i,-




End-if?
Answer:
2

The condition ( x > 0 ) evaluates to false because the value of x is -2. The
i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,-


line abs := x is skipped and the line abs := -x is executed. Therefore the
i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,-


final value of abs is -x, which is -(-2) = 2.
i,- i,- i,- i,- i,- i,- i,- i,- i,- i,-




Question:
1.5.2: For-loops i,-




Consider the following pseudocode fragment: i,- i,- i,- i,-




sum := 0 i,- i,-




For i = 2 to 5
i,- i,- i,- i,- i,-

,i,- sum := sum + ii,- i,- i,- i,-




End-for



1) What is the value of sum after the second iteration?
i,- i,- i,- i,- i,- i,- i,- i,- i,- i,-




2) How many iterations will the for-loop execute?
i,- i,- i,- i,- i,- i,- i,-




3) What is the final value for sum after executing the for-loop??
i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,-




Answer:

1) 5 i,-




In the first iteration, i = 2. In the second iteration, i = 3. 2 + 3 = 5
i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,-




2) 4 i,-




i = 2, 3, 4, 5. Four iterations
i,- i,- i,- i,- i,- i,- i,-




3) 14 i,-




i = 2, 3, 4, 5. sum = 2 + 3 + 4 + 5
i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,-




Question:

1.6.2: While-loops i,-




product := 1 i,- i,-

, count := 5 i,- i,-




While ( count > 0 )
i,- i,- i,- i,- i,-




i,- product := product⋅count i,- i,-




i,- count := count - 2
i,- i,- i,- i,-




End-while



1) What is the value of product after the second iteration?
i,- i,- i,- i,- i,- i,- i,- i,- i,- i,-




2) How many iterations will the while-loop execute?
i,- i,- i,- i,- i,- i,- i,-




3) What is the final value for product??
i,- i,- i,- i,- i,- i,- i,-




Answer:

1) 15 i,-




In the first iteration, count = 5. In the second iteration, count = 3. 5⋅3 = 15
i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,-




2) 3 i,-




count = 5, 3, 1. Three iterations
i,- i,- i,- i,- i,- i,-




3) 15 i,-




product = 5⋅3⋅1 = 15 i,- i,- i,- i,-




Question:

Información del documento

Subido en
23 de julio de 2026
Número de páginas
195
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$13.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
AcademiaExpert
3.8
(510)
Vendido
1987
Seguidores
766
Artículos
4508
Última venta
19 horas hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes