Front
Back
What is pseudocode used for?
To plan program algorithms in structured English before converting them into a programming language.
Name two main methods for planning program algorithms.
Pseudocode (structured English) and flowcharts.
What does BEGIN … END represent in pseudocode?
It marks where an algorithm starts and finishes or separates sections of code.
Which pseudocode keywords are used for input and output?
INPUT and OUTPUT.
What is PRINT used for in pseudocode?
To produce a hard copy output.
What is the difference between READ and WRITE in pseudocode?
READ reads data from a file; WRITE writes data to a file.
Which keywords represent decisions in pseudocode?
IF … THEN … ELSE … ELSEIF (ELIF) and WHEN (select-case).
How are simple branches typically formatted in pseudocode?
Use IF … THEN with indented actions or wrapped in BEGIN … END.
What is ELSE used for in pseudocode?
To specify actions when an IF … THEN condition is not met.
What is ELSEIF (ELIF) used for?
For additional tests when the previous IF condition is not met.
What is WHEN used for in pseudocode?
To represent a select-case structure with multiple branches based on a variable’s value.
Name three pseudocode structures for repetition.
FOR … NEXT; REPEAT UNTIL; WHILE / WHILE NOT.
Describe the FOR loop in pseudocode.
An unconditional loop that iterates a set number of times specified on the pseudocode line.
Describe REPEAT UNTIL in pseudocode.
A conditional loop that continues until the specified condition becomes true.
Describe WHILE / WHILE NOT in pseudocode.
Conditional loops that iterate while a condition is true (or not true).
List two DOs when writing pseudocode.
Use command words to identify branches/loops; use indents to show structure.
List two DON’Ts when writing pseudocode.
Do not write actual runnable code; do not include excessive detail about how actions occur.
In Zilch pseudocode, what does the Totals() array store?
The count of how many times each dice number (1–6) was thrown.
Why set Winner to True before checking Totals()?
Assume all numbers were thrown; set to False if any number count is zero.
How does the Zilch pseudocode handle the highest score (1,2,3,4,5,6)?
By checking Totals() to confirm each number 1–6 appears once, then adding 3000 to Score.
How are points for dice showing 1 and 5 calculated?
Add 100 for each 1 and 50 for each 5; decrement DiceLeft accordingly.
What initializations occur before counting dice in Zilch?
Set Score to 0 and set each Totals(X) to 0 using a FOR loop.
What is the purpose of indentation in pseudocode?
To show the code included within a structure like a loop or a branch.