Midterm review Programming Logic
and Design (chapter 1-5) Questions
and Answers
If the variable named AVG has a value of 73, what is the value of GRADE after the
instructions corresponding to the following psedocode are executed?
IF AVG > 93 Then
GRADE = "A"
Else
If AVG > 83 then
Grade= "B"
Else
Grade = "P"
Endif
Endif - ANSWER-C
If the variable named ANSWER have a value of 1, what will be output after the
instructions corresponding to the following pseudocode are executed?
IF ANSWER = 1 Then
Write " Hello"
Else
If ANSWER = 2 then
Write " Goodbye"
Else
Write " Good day "
Endif
Endif - ANSWER-A. Hello
In the following psedocode , the value for TRANSCODE is an example of a(n)?
Start
Read TRANSCODE
CASENTRY TRANSCODE
CASE " Receipt"
Process B000
CASE " Order"
Process B010
CASE "Withdrawal"
Process B020
CASE " Adjustment"
Process B030
ENDCASE
Write GRADE
and Design (chapter 1-5) Questions
and Answers
If the variable named AVG has a value of 73, what is the value of GRADE after the
instructions corresponding to the following psedocode are executed?
IF AVG > 93 Then
GRADE = "A"
Else
If AVG > 83 then
Grade= "B"
Else
Grade = "P"
Endif
Endif - ANSWER-C
If the variable named ANSWER have a value of 1, what will be output after the
instructions corresponding to the following pseudocode are executed?
IF ANSWER = 1 Then
Write " Hello"
Else
If ANSWER = 2 then
Write " Goodbye"
Else
Write " Good day "
Endif
Endif - ANSWER-A. Hello
In the following psedocode , the value for TRANSCODE is an example of a(n)?
Start
Read TRANSCODE
CASENTRY TRANSCODE
CASE " Receipt"
Process B000
CASE " Order"
Process B010
CASE "Withdrawal"
Process B020
CASE " Adjustment"
Process B030
ENDCASE
Write GRADE