Programming Flashcards
What are the characteristics of the Float data type?
- Can store numbers with decimal points.
- Are not exact.
What are the characteristics of an Array?
- List of values of the same data type
- Each object is called an array element
- Difficult to change array length
What are the characteristics of a Record?
- Holds data in fields that can be different data types
What is a Global Variable?
A variable that’s value can be accessed throughout the entire program/code.
What is a Local Variable?
A variable that’s value can only be accessed within a specific module/function.
What are the 3 Control Structures?
- Selection
- Sequence
- Iteration
What are the 3 types of Selection?
- One-way selection means choosing do an action or do nothing.
- Two-way selection means choosing to do one action or an alternate action.
- Multi-way selection means choosing between many actions.
What are the 3 types of Iteration?
- While: Test first, number of iterations is not known.
- For Next: Test first, repeats a counted or fixed number of times.
- Repeat… Until: Test last, is executed at least once.
What is a stub?
A simple program routine/module that stands in for a more complex routine to be written at a later date.
What is Modularisation?
A strategy to reduce coupling in a computer program, mostly by means of encapsulation.
What is a Function?
A special type of module with no inputs or outputs that returns a single value through the function’s name.
What is a Logical Error?
Program does not function how it is intended and/or outputs data that is incorrect.
What is a Run-Time Error?
Program crashes during execution. Can be caused by dividing by zero and/or use of incorrect data types.
Program was made correctly, compiled correctly, but cant follow instructions.
What is Syntax Error?
The correct language conventions have not been adhered to - program is not able to execute. E.g. Not closing a bracket when print out text in Python.
What is the purpose of Internal Documentation?
Purpose is to provide comments and explanations on what the code is doing. This helps other coders working on the project to contribute and/or modify when required.