Quiz: Lab — Algorithm
e Due Jul 6 at 11:59pm
* Points 50
¢ Questions 14
e Time Limit 45 Minutes
Instructions
The quiz:
e Covers the Learn material from Module 1: Week 1.
* Contains 14 multiple-choice and matching questions.
* Has a 45 minute time limit.
e Allows 1 attempt.
e |s worth 50 points.
This lab is open book and it is encouraged that you learn through researching.
Submit this assignment by 11:59 p.m. (ET) on Monday of Module 1: Week 1.
Attempt History
Attempt Time Score
LATEST Attempt 1 33 minutes 47.5 out of 50
Correct answers are hidden.
Score for this quiz: 47.5 out of 50
Submitted Jul 5 at 5:19pm
This attempt took 33 minutes.
Partial
Question 1
2.25/ 3 pts
This algorithm will multiple a number by repeatedly adding the value of A the number of times stated in the value of B.
For example, if A = 10 and B = 3, This algorithm will perform the following :
10+10+10=30
Tip: Notice that this only added the value of A 3 times but in your response, you will see it shows up to 4 iterations.
If this happens in any of these exercises, the proper answer would be "Loop Ended" for both Count and Product.
A=3 B=4
Get A
GetB
STEP1 IfA orB=0
Then Set Product to = 0 and Go To STEP 3
, Else Set Count to 0 and Set Product to 0 and Go To STEP 2
STEP 2 While Count <B
Set Product to (Product + A)
Set Count to (Count + 1)
End of Loop;
STEP 3 Print the value of Product
STEP 4 Stop
After Iteration 1:
Count equals 1
Product equals 3
After Iteration 2:
Count equals 2
Product equals [ Select ]
After Iteration 3:
Countequals| [Select]
Product equals| [ Select]
After lteration 4;
Count equals| [Select]
Product equals Loop Ended
Answer 1:
1
2
3
4
Loop Ended
Answer 2:
0
3
6
9
, 12
Loop Ended
Answer 3:
1
2
3
4
Loop Ended
Answer 4:
0
3
6
9
12
Loop Ended
Answer 5:
1
2
3
4
Loop Ended
Answer 6:
0
3
6
9
12
Loop Ended
Answer 7:
1
2
3
4
Looped Ended
Answer 8:
0
3
6
9
12
Loop Ended
Partial
Question 2
2.25/ 3 pts
This algorithm will multiple a number by repeatedly adding the value of A the number of times stated in the value of B.
e Due Jul 6 at 11:59pm
* Points 50
¢ Questions 14
e Time Limit 45 Minutes
Instructions
The quiz:
e Covers the Learn material from Module 1: Week 1.
* Contains 14 multiple-choice and matching questions.
* Has a 45 minute time limit.
e Allows 1 attempt.
e |s worth 50 points.
This lab is open book and it is encouraged that you learn through researching.
Submit this assignment by 11:59 p.m. (ET) on Monday of Module 1: Week 1.
Attempt History
Attempt Time Score
LATEST Attempt 1 33 minutes 47.5 out of 50
Correct answers are hidden.
Score for this quiz: 47.5 out of 50
Submitted Jul 5 at 5:19pm
This attempt took 33 minutes.
Partial
Question 1
2.25/ 3 pts
This algorithm will multiple a number by repeatedly adding the value of A the number of times stated in the value of B.
For example, if A = 10 and B = 3, This algorithm will perform the following :
10+10+10=30
Tip: Notice that this only added the value of A 3 times but in your response, you will see it shows up to 4 iterations.
If this happens in any of these exercises, the proper answer would be "Loop Ended" for both Count and Product.
A=3 B=4
Get A
GetB
STEP1 IfA orB=0
Then Set Product to = 0 and Go To STEP 3
, Else Set Count to 0 and Set Product to 0 and Go To STEP 2
STEP 2 While Count <B
Set Product to (Product + A)
Set Count to (Count + 1)
End of Loop;
STEP 3 Print the value of Product
STEP 4 Stop
After Iteration 1:
Count equals 1
Product equals 3
After Iteration 2:
Count equals 2
Product equals [ Select ]
After Iteration 3:
Countequals| [Select]
Product equals| [ Select]
After lteration 4;
Count equals| [Select]
Product equals Loop Ended
Answer 1:
1
2
3
4
Loop Ended
Answer 2:
0
3
6
9
, 12
Loop Ended
Answer 3:
1
2
3
4
Loop Ended
Answer 4:
0
3
6
9
12
Loop Ended
Answer 5:
1
2
3
4
Loop Ended
Answer 6:
0
3
6
9
12
Loop Ended
Answer 7:
1
2
3
4
Looped Ended
Answer 8:
0
3
6
9
12
Loop Ended
Partial
Question 2
2.25/ 3 pts
This algorithm will multiple a number by repeatedly adding the value of A the number of times stated in the value of B.