Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Q#1: Write a pseudo code to print 50 names on screen.

Q#2: An algorithm has been written in pseudocode to input some numbers. It only outputs any numbers that are greater than or equal to 100.
The number 999 is not output and stops the algorithm.

INPUT Number

WHILE Numbers <> 999

DO

IF Number > 100

THEN

OUTPUT Number

ENDIF

ENDWHILE

OUTPUT Number

Identify the four errors in the pseudocode and suggest corrections.

Numbers should be Number

• IF Number > 100 should be IF Number >= 100

• INPUT Number is missing from inside the loop, insert INPUT Number after the ENDIF statement. •

The final OUTPUT Number is not needed, remove it.

Q#1: Write a pseudo code to print 50 names on screen.


Q#2: An algorithm has been written in pseudocode to input some numbers. It only outputs any numbers that are greater than or equal to 100.
The number 999 is not output and stops the algorithm.

INPUT Number

WHILE Numbers <> 999

DO

IF Number > 100

THEN

OUTPUT Number

ENDIF

ENDWHILE

OUTPUT Number

Identify the four errors in the pseudocode and suggest corrections.

Numbers should be Number

• IF Number > 100 should be IF Number >= 100

• INPUT Number is missing from inside the loop, insert INPUT Number after the ENDIF statement. •

The final OUTPUT Number is not needed, remove it.

You might also like