Zusammenfassung der Ressource
Abstraction and Automation
- Algorithms
- 'Algorithm' comes from the name of a Latin book called 'Algoritmi de numero Indorum'
- This means 'Al-Khwarismi on the Hindu Art of Reckoning'
- The aim of algorithms is to be as specific as possible
- Ambiguity can lead to issues
- Must be in a defined sequence as order is important
- Use four basic structures
- Sequence
- Selection
- Iteration
- Assignment
- Must terminate
- The AQA definition is 'a sequence of steps that can be followed to complete a task and that always terminates'
- AQA's preferred pseudo-code conventions
- Sequence
- INPUT, OUTPUT, etc.
- Assignments
- x <--- 10
- Selection
- IF, THEN, ELSE, ENDIF
- Iteration
- FOR, ENDFOR, WHILE, ENDWHILE, REPEAT, UNTIL
- Trace tables
- Why use them?
- Makes sure an algorithm will work properly
- A dry run of a program will help
troubleshoot
- Tracks the values of variables throughout the program