0 of 6 Questions completed
Questions:
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
Time has elapsed
You have reached 0 of 0 point(s)0
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
What technique do we use to identify errors in our code?
True or False: We cannot use flowcharts when trying to identify errors in an algorithm.
Either through visual inspection or using a trace table, identify the purpose of this algorithm.
number1 ← USERINPUT
number2 ← USERINPUT
result ← (number1 + number2) / 2
OUTPUT result
Complete the trace table for this algorithm, when the numbers 2, 9, 1 & 3 are input.
number ← USERINPUT
IF number < 5 THEN
OUTPUT 'A'
ELSE
OUTPUT 'B'
ENDIF
Number | Output |
---|---|
2 | |
9 | |
1 | |
3 |
Complete the trace table for this algorithm.
total ← 0
FOR x ← 0 TO 4
total ← total + 1
ENDFOR
x | total |
---|---|
0 | |
0 | |
1 | |
2 | |
3 | |
4 |
Complete the trace table for this algorithm.
FOR counter ← 0 TO 4
result ← counter * 2
ENDFOR
counter | result |
---|---|
0 | |
1 | |
2 | |
3 | |
4 |