11 Programming - Cambridge AS & A Level Class 11 Computer Science Notes, Diagrams and Solved Questions
Constants, declarations, assignment and operators, built-in string and numeric functions, IF and CASE selection, the three kinds of loop and how to justify a choice, and procedures and functions with BYVAL and BYREF parameters.
In this chapter
Declaring variables and constants and using assignment, DIV, MOD and logic operators
Using built-in functions such as LENGTH, MID, RIGHT, UCASE, INT and RAND
Writing IF … ELSE, nested IF and CASE with ranges and OTHERWISE
Choosing and justifying count-controlled, post-condition and pre-condition loops
Defining and calling procedures with BYVAL and BYREF parameters
Defining functions and the terms header, interface, parameter, argument and return value
Writing efficient, structured pseudocode with Python and Java equivalents