Problem solving/ Algorithm Flashcards
What is Problem solving?
Creating a set of instructions that when executed accepts input and produces meaningful information.
What is an Algorithm?
A sequence if instructions which solves a problem
What are the steps in problem solving?
- Define the problem
- Propose and evaluate the solutions
- Determine the best solution
- Develop the algorithm
- Represent the algorithm using pseudo code or flowchart
- Test the solutions
What is the Divide and Conquer Approach?
Repeatedly split a large problem into a smaller sub problem until a complete solution is identified.
What is a variable?
Area of storage whose value changes during processing. Eg. Price
What is a constant?
An area of storage whose value does not change during processing. Eg. Pi is always 3.14
What is an identifier?
A name given to a variable/constant by a programmer.
What are characteristics of a good algorithm?
•It must be precise
•It must be unambiguous
•It must be in a logical sequence
•It must have a finite number of steps or it must end.
What are data types?
It specifies what values a variable or constant can hold.
Integer
Whole numbers
Real
Any number that contains a decimal place.
String
Text or sequence of characters.
Cher
A single character found on a keyboard.
Bolean
True or False/ Yes or no
What are the types of Algorithms?
Pseudocodes and Flowcharts