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
Examen

WGU C960 Unit 1: SOLN Algorithms | Questions and Answers | 2026 Updates | 100% correct

Puntuación
-
Vendido
-
Páginas
9
Grado
A+
Subido en
11-06-2026
Escrito en
2025/2026

WGU C960 Unit 1: SOLN Algorithms | Questions and Answers | 2026 Updates | 100% correct

Institución
Grado

Vista previa del contenido

C960: Supplementary Practice Unit 1

Module 1: Algorithm Structures

1 With the pseudo-code below, determine the final value of sum when n=23.

Algorithm 1
1: procedure
2: sum = 0
3: for (i=2, i<n, i=i+3) do
4: if i mod 2 == 0
5: sum = sum + i


Solution: sum = 44
With i starting at 2 and incrementing by 3 every iteration, i will iterate through the values 2, 5, 8, 11, 14,
17, and 20. The if statement means sum will only be updated when i is even, adding 2, 8, 14, and 20 for
a total of 44


2 Use the pseudo-code below to answer the following question.
(a) Without working through the pseudo-code, how many times with val be updated in Line 7?

Solution: 24
The loop in line 5 will iterate 4 times. The loop in line 6 will iterate 6 times. Since they are nested,
we multiply and val will be updated 4 · 6 = 24 times.

(b) What is the final value of val.

Solution: val = 210
The algorithm loops through all possible combinations of x and y, multiplies them, and adds them to
val. In the end, we get
1·1+1·2+1·3+1·4+1·5+1·6 +
2·1+2·2+2·3+2·4+2·5+2·6 +
3·1+3·2+3·3+3·4+3·5+3·6 +
4 · 1 + 4 · 2 + 4 · 3 + 4 · 4 + 4 · 5 + 4 · 6 = 210


Algorithm 2
1: procedure
2: dFour = [1, 2, 3, 4]
3: dSix = [1, 2, 3, 4, 5, 6]
4: val = 0
5: for (x in dFour) do
6: for (y in dSix) do
7: val = val + x·y




Suggestions or errors? Monday 13th September, 2021
Email the IT Math Team

, C960: Supplementary Practice Unit 1

3 Using the pseudo-code below, what is the ending value for count when n = 100? When n = 10,000?
When n = 1042 ?

Algorithm 3
1: procedure
2: count=0
3: while (n>1) do
4: count++
5: n = n/10


Solution:
When n = 100, count will end at 2.

When n = 10,000, count will end at 4.

When n = 1042 , count will end at 42.



4 This question assumes familiarity with modular arithmetic discussed in Unit 2. In the pseudo-code below,
Line 7 performs string addition (concatenation), for example:
"a" + "b" = "ab". Even if the addends look like numbers, it will still do string addition:
"2" + "3" = "23". Answer the questions below.
a. What is the output of the algorithm when x = 99 and b = 2?

Solution: Context for writing a number in base b is presented in Module 6 of Unit 2.
Expand(99, 2) = "1100011"

b. What is the output of the algorithm when x = 1642 and b = 8?

Solution: Expand(1642, 8) = "3152"

Algorithm 4
1: procedure E X P A N D (x, b)
2: Input: integers x and b
3: Output: outVal, x written in base b
4:
5: outVal = an empty string
6: while (x>0) do
7: outVal = string(x mod b) + outVal
8: x = x div b
9: return(outVal)




Suggestions or errors? Page 2 of 9 Monday 13th September, 2021
Email the IT Math Team

Escuela, estudio y materia

Institución
Grado

Información del documento

Subido en
11 de junio de 2026
Número de páginas
9
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

$15.99
Accede al documento completo:

¿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

Conoce al vendedor

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.
Nipsey Chamberlain School Of Nursing
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
2104
Miembro desde
5 año
Número de seguidores
1528
Documentos
15175
Última venta
1 día hace
LECT EXAMS

FOR THE BEST ASSIGNMENTS,TEST BANKS,EASSY AND TO HELP IN TUTORING I have done papers of various topics and complexities. I am punctual and always submit work on-deadline. I write engaging and informative content on all subjects. Send me your research papers, case studies, psychology papers, etc , and I’ll do them to the best of my abilities. Writing is my passion when it comes to academic work. I’ve got a good sense of structure and enjoy finding interesting ways to deliver information in any given paper. I love impressing clients with my work, and I am very punctual about deadlines. Send me your assignment and I’ll take it to the next level. I strive for my content to be of the highest quality. Your wishes come first— send me your requirements and I’ll make a piece of work with fresh ideas, consistent structure, and following the academic formatting rules For every student you refer to me with an order that is completed and paid transparently, I will do one assignment for you, free of charge!!

Lee mas Leer menos
4.1

371 reseñas

5
216
4
57
3
55
2
14
1
29

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