Information Technology • Algorithms

IT Pseudocode

IT Pseudocode — Explanation

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.

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)

IT Pseudocode — Key Terms

Key concepts in English, with te reo Māori, Chinese (Simplified) and Korean.

EnglishTe reo Māori中文(简体)한국어What it means on this page
Assignmentno attested term——Giving a variable a value. Pseudocode writes it with an arrow: Total ← 0.
Parameterno attested term——A value passed to a procedure or function when it's called, named in its header, such as Size in PROCEDURE Line(Size : INTEGER).
Countingno attested term——Adding 1 to a variable each time something happens, to find how many times it happened: Count ← Count + 1.
Totallingno attested term——Adding each value to a running total, which starts at 0, to find their sum: Total ← Total + Value.
Pseudocodeno attested term伪代码의사코드A structured, language-independent way of writing an algorithm, using keywords like IF, FOR and WHILE.
Algorithmhātepe算法알고리즘A precise sequence of steps for solving a problem — what both the pseudocode and the flowchart on this page describe.
Variabletāupe变量변수A named location that holds a value which can change while the algorithm runs — the columns of the trace table.
Sequenceraupapa顺序结构순차 구조Steps carried out one after another, in the order they are written or drawn.
Selectionno attested term选择结构선택 구조A decision point where the algorithm follows one of two or more branches — IF or CASE, or a decision box in a flowchart.
Iteration (loop)koromeke循环(迭代)반복(루프)A block of steps that repeats — FOR, WHILE or REPEAT — while or until a condition holds.
Nested IFno attested term嵌套 IF (qiàntào IF)중첩 IF (jungcheop IF)An IF function inside another IF, used to choose between more than two results, such as grades A, B, C or U.
Procedurearamahi过程프로시저A named block of instructions that is run (CALLed) but does not return a value.
Trace tableno attested term追踪表추적표A table used to record the value of each variable, row by row, as an algorithm is dry-run by hand.
Conditionno attested term条件조건An expression that is tested and evaluates to TRUE or FALSE, used to control a selection or iteration.

On the te reo Māori column. Terms marked as gaps have no attested equivalent in the sources checked — Karaitiana Taiuru's Dictionary of Māori Computer and Social Media Terms, Paekupu, the Reserve Bank's te reo financial glossary, NZQA and Te Aka. No coinage is printed as though it were established; where a class needs one, commission it from Te Taura Whiri i te Reo Māori and credit the translator. Te reo Māori is not italicised and takes no plural "s".