Selection?
IF….ELSE
Iteration?
FOR….ENDFOR
WHILE….ENDWHILE
REPEAT…UNTIL
4 different sorts?
Linear search
Bubble sort
Merge sort
What is FOR…ENDFOR loop an example of?
definite iteration
What is WHILE…ENDWHILE loop an example of?
indefinite iteration
What is REPEAT…UNTIL loop an example of?
indefinite iteration
What is a subroutine?
A named, self-contained section of code that performs a specific task.
What are the 2 different types of subroutines?
What are advantages of subroutines?
Define global variable?
A global variable is one which is declared in the main program and is recognised in al subroutines called from the main program.
Define local variable.
Declared within the subroutine and only existing whole the function is being executed. Not recognised anywhere else in the program.
Advantages of using local variables
How to make a code more understandable?
What is a syntax error?
What are logic errors?
Define low-level language
Machine code and assembly language
What is high-level language?
Coding platforms like python, java etc
What are advantage of high-level language?
Advantages of low-level languages
Often used in embedded systems
Differences between machine code and assembly code
Machine code is the code executed by the processor, and consists only of 0s and 1s. In assembly language, have to be translated into machine code before they can be executed.
What is an assembler?
An assembler converts assembly language into machine code. High level language -> Assembly code (assembler) -> Machine code
How to make a program more robust?
Add validation
Advantage to stuctured approach?
Limitation to array
Only stores one data type