Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Question: The following pseudo code IF AVG > 93 THEN GRADE = \"A\" ELSE GRADE

ID: 3609482 • Letter: 1

Question

1. Question: The following pseudo code

IF AVG > 93 THEN

GRADE = "A"

ELSE

GRADE = "B"

ENDIF

IF AVG > 73 THEN

GRADE = "C"

ELSE

GRADE = "F"

ENDIF

represents a

sequential IF-THEN-ELSE-ENDIF pattern

nested IF-THEN-ELSE-ENDIF pattern

null IF-THEN-ELSE-ENDIF pattern

simple IF-THEN-ELSE-ENDIF pattern

:

2. Question: If the variable ANSWER has the value of 1, whatwill be the output after the instructions corresponding to thefollowing pseudo code are executed?

IF ANSWER = 1 THEN

Write "Hello"

ENDIF

IF ANSWER = 2 THEN

Write "Goodbye"

ELSE

Write "Good day"

ENDIF

Hello

Goodbye

Good day

both 1 and 3

3. Question: What is the value of ANSWER after the instructionscorresponding to the following pseudo code are executed?

(Remember the loop is executed at least once)

COUNT = 1

SUM = 3

DOWHILE COUNT >= 0

SUM = SUM + COUNT

COUNT = COUNT - 1

ENDDO

ANSWER = SUM

3

4

5

6

4. Question: The following pseudocode

IF AVG > 93 THEN

GRADE = "A"

ELSE

IF AVG > 83 THEN

GRADE = "B"

ELSE

GRADE = "P"

ENDIF

ENDIF

REPRESENTS A

sequential IF-THEN-ELSE-ENDIF pattern

nested IF-THEN-ELSE-ENDIF pattern

null IF-THEN-ELSE-ENDIF pattern

simple IF-THEN-ELSE-ENDIF pattern

5. Question: The decision point in an IF-THEN-ELSE-ENDIFstatement is called an unconditional branch.

True

False

6. Question: Pseudo code may be a more suitable tool thanflowcharting when working on complex problems.

True

False

Comments:

7. Question: The following pseudo code

IF AVG > 60 THEN

GRADE = "X"

ELSE

GRADE = "Y"

ENDIF

IF AVG > 90 THEN

GRADE = "Z"

ELSE

GRADE = "F"

ENDIF

represents a none of the below answers

nested IF-THEN-ELSE-ENDIF pattern

null IF-THEN-ELSE-ENDIF pattern

simple IF-THEN-ELSE-ENDIF pattern

8. Question: If the variable named AVG has a value of 93, whatis the value of GRADE after the instructions corresponding to thefollowing pseudo code are executed?

IF AVG > 93 THEN

GRADE = "A"

ELSE

GRADE = "B"

ENDIF

IF AVG > 73 THEN

GRADE = "C"

ELSE

GRADE = "F"

ENDIF

A

B

C

P

9. Question: In the nested IF-THEN-ELSE-ENDIF pattern, it isprobable that many tests will be skipped.

True

False

10. Question: If the variable named AVG has a value of 93, whatis the value of GRADE after the instructions corresponding to thefollowing pseudo code are executed?

IF AVG > 93 THEN

GRADE = "A"

ELSE

IF AVG > 83 THEN

GRADE = "B"

ELSE

GRADE = "P"

ENDIF

ENDIF

A

B

C

P

:

11. Question: If the variable named AVG has a value of 73, whatis the value of GRADE after the instructions corresponding to thefollowing pseudo code are executed?

IF AVG > 93 THEN

GRADE = "A"

ELSE

GRADE = "B"

ENDIF

IF AVG > 73 THEN

GRADE = "C"

ELSE

GRADE = "F"

ENDIF

A

B

C

F

12. Question: If the variable named AVG has a value 73, what isthe value of GRADE after the instructions corresponding to thefollowing pseudo code are executed?

IF AVG > 93 THEN

GRADE = "A"

ELSE

IF AVG > 83 THEN

GRADE = "B"

ELSE

GRADE = "P"

ENDIF

ENDIF

A

B

P

none of the above

13. Question: The SIMPLE SEQUENCE control structure is thesimplest control structure but it is rarely used.

True

False

14. Question: A single piece of data about a single entity isa

file

record

field

character

15. Question: What is the value of ANSWER after the instructionscorresponding to the following pseudo code are executed?

(Remember the loop is executed at least once)

COUNT = 10

SUM = 30

DOWHILE COUNT >= 9

SUM = SUM + COUNT

COUNT = COUNT - 1

ENDDO

ANSWER = SUM

3

answer not listed

5

6

16. Question: If the value of input is 8, how many times willthe instructions within the loop below be executed?

Read START

COUNT = START

DOWHILE COUNT >= START

COUNT = COUNT - 1

Write COUNT

ENDO

0

1

8

infinite

Explanation / Answer

1. Question: The following pseudo code

IF AVG > 93 THEN

GRADE = "A"

ELSE

GRADE = "B"

ENDIF

IF AVG > 73 THEN

GRADE = "C"

ELSE

GRADE = "F"

ENDIF

represents a

sequential IF-THEN-ELSE-ENDIF pattern

nested IF-THEN-ELSE-ENDIF pattern

null IF-THEN-ELSE-ENDIF pattern

simple IF-THEN-ELSE-ENDIF pattern

:

2. Question: If the variable ANSWER has the value of 1, whatwill be the output after the instructions corresponding to thefollowing pseudo code are executed?

IF ANSWER = 1 THEN

Write "Hello"

ENDIF

IF ANSWER = 2 THEN

Write "Goodbye"

ELSE

Write "Good day"

ENDIF

Hello

Goodbye

Good day

both 1 and 3

3. Question: What is the value of ANSWER after the instructionscorresponding to the following pseudo code are executed?

(Remember the loop is executed at least once)

COUNT = 1

SUM = 3

DOWHILE COUNT >= 0

SUM = SUM + COUNT

COUNT = COUNT - 1

ENDDO

ANSWER = SUM

3

4

5

6

4. Question: The following pseudocode

IF AVG > 93 THEN

GRADE = "A"

ELSE

IF AVG > 83 THEN

GRADE = "B"

ELSE

GRADE = "P"

ENDIF

ENDIF

REPRESENTS A

sequential IF-THEN-ELSE-ENDIF pattern

nested IF-THEN-ELSE-ENDIF pattern

null IF-THEN-ELSE-ENDIF pattern

simple IF-THEN-ELSE-ENDIF pattern

5. Question: The decision point in an IF-THEN-ELSE-ENDIFstatement is called an unconditional branch.

True

False

6. Question: Pseudo code may be a more suitable tool thanflowcharting when working on complex problems.

True

False

Comments:It depends on the persons preference

7. Question: The following pseudo code

IF AVG > 60 THEN

GRADE = "X"

ELSE

GRADE = "Y"

ENDIF

IF AVG > 90 THEN

GRADE = "Z"

ELSE

GRADE = "F"

ENDIF

represents a none of the below answers sequential

nested IF-THEN-ELSE-ENDIF pattern

null IF-THEN-ELSE-ENDIF pattern

simple IF-THEN-ELSE-ENDIF pattern

8. Question: If the variable named AVG has a value of 93, whatis the value of GRADE after the instructions corresponding to thefollowing pseudo code are executed?

IF AVG > 93 THEN

GRADE = "A"

ELSE

GRADE = "B"

ENDIF

IF AVG > 73 THEN

GRADE = "C"

ELSE

GRADE = "F"

ENDIF

A

B

C

P