Programming Flashcards
Define the term ‘algorithm’
An algorithm is a step-by-step set of instructions designed to perform a specific task or solve a particular problem.
Explain what is meant by ‘decomposition’
Decomposition refers to the process of breaking down a complex problem into smaller, more manageable sub-problems or tasks.
Explain what is meant by ‘abstraction’
Abstraction involves focusing on the essential details while ignoring unnecessary complexities. It allows us to represent real-world problems in a simplified manner, emphasizing only the relevant aspects needed to understand or solve the problem.
Interpret pseudocode
Pseudocode is a high-level description of a computer program or algorithm written in plain English or a mixture of natural language and informal programming syntax.
Write pseudocode
- Start
- Input a number
- If the number is greater than 10, then
- Display “Number is greater than 10”
- Else
- Display “Number is less than or equal to 10”
- End If
- Stop
Identify inputs, processes, and outputs within a given algorithm
Inputs are the data provided to the algorithm at the beginning. Processes are the steps or operations performed on the input data. Outputs are the results produced by the algorithm after processing the input.
Describe the purpose of a given algorithm
The purpose of an algorithm is to solve a specific problem or perform a particular task efficiently and accurately by following a predefined set of steps.
Describe what is meant by ‘data type’
A data type defines the type of data that a variable can hold. It specifies the range of values that the variable can take and the operations that can be performed on it.
Define ‘integer’
A data type that represents whole numbers without any fractional part.
Define ‘real’
A data type that represents numbers with a fractional part.
Define ‘Boolean’
A data type that represents true or false values.
Define ‘character’
A data type that represents a single character, such as a letter, digit, or symbol.
Define ‘string’
A data type that represents a sequence of characters.
Describe ‘iteration’
Iteration involves repeating a set of instructions or a block of code multiple times until a specific condition is met or for a specified number of times.
Describe ‘selection’
Selection, also known as conditional statements, involves making decisions based on certain conditions. It allows the program to execute different sets of instructions based on whether a condition is true or false.