Write algorithms in pseudocode as Cambridge International AS Level Information Technology (9626) asks, then run them. 9626 pseudocode, as its papers and mark schemes write it, is simpler than Computer Science pseudocode: variables don't need declaring, names can be in lower case, and a procedure's parameters have no data types.
- assignment uses the arrow, ←: type
<--, or press the ← button;
INPUT (or READ) reads values, as in INPUT base, height; OUTPUT, PRINT or WRITE shows them;
- decisions and loops:
IF … THEN … ELSE … ENDIF, CASE … ENDCASE, FOR … NEXT (with STEP), REPEAT … UNTIL and WHILE … ENDWHILE; the comparison operators >, < and =, and arithmetic + - * /;
- procedures:
PROCEDURE … ENDPROCEDURE, run with CALL.
Keywords are still in capitals, and every structure must be closed (ENDIF, NEXT, UNTIL, ENDWHILE): mark schemes give marks for them, and for indenting the statements inside them.
Run runs your algorithm in the run window (INPUT asks you there); Step goes a statement at a time; the trace table fills in as it runs. Check answer runs it on the question's tests, some of them hidden. If it's not right, you're told which test it failed and what that suggests, never the answer. Hint halves the question's marks; Show me shows an algorithm that works, and the question scores nothing. Playground is a free editor. Signed in, your work is saved as you go, and topics your teacher has set come up first.
Objective: Cambridge International AS & A Level Information Technology 9626, AS topic 4.1 Algorithms: write an algorithm in pseudocode to solve a given problem using INPUT/READ, WRITE/PRINT, FOR…NEXT, FOR…NEXT…STEP, IF…ELSE…ENDIF, WHILE…ENDWHILE, REPEAT…UNTIL, CASE…ENDCASE, comparison and arithmetic operators and procedures; and topic 3, algorithms for monitoring and control systems.
Where this fits
- Cambridge: Cambridge A Level Information Technology (9626); Cambridge AS Level Information Technology (9626)