Practice reading and repairing beginner-friendly pseudocode. Identify how IF, THEN, ELSE, and END IF organize instructions, spot syntax mistakes, and explain why precise structure matters.
Read the pseudocode.
IF batteryIsLow THEN
showWarning
ELSE
continueGame
END IF
When does continueGame run?
A student wants the program to show Access granted if hasPass is true, and Ask for a pass otherwise. Which pseudocode has the correct structure?
Fix the syntax mistake in this pseudocode by changing only the keyword order:
IF THEN score >= 10
showSuccess
END IF
Write the corrected first line.
A program contains this line:
IF doorIsOpen THEN ringBell
In the pseudocode convention used in this activity, a conditional must have separate indented action lines and end with END IF. What is the best fix?
A classmate says, “If a program’s instructions are understandable to a person, exact syntax does not matter.” Explain why proper syntax still matters, and distinguish a syntax mistake from a logic mistake.
Which sequence correctly shows the structure of a conditional in this activity’s pseudocode convention?
Read the pseudocode.
IF hasTicket THEN
enterEvent
ELSE
waitOutside
END IF
Which action runs when hasTicket is true?
This conditional is missing a required keyword in the activity’s pseudocode convention:
IF isRaining THEN
bringUmbrella
Which line should be added to complete the structure?
Complete the conditional by placing the correct keyword in each blank. isWeekend haveFreeTime finishHomework
WHILE
ELSE
END IF
IF
THEN
A program uses this line:
IF hasEnoughTime THEN
startMovie
END IF
The code follows the activity’s keyword and block format, but the program should start the movie only when hasEnoughTime is false. What kind of mistake is shown?