Problem solving and program design Flashcards
What are the steps in problem solving
1) Define the problem
2) Propose suggestions and evaluate them to get the right solution
3) Determine the most efficient solution
4) Develop the algorithm
5) Test and validate the solution
a solution is …
a set of instructions that,
if followed in order
will produce the required information
What is an efficient solution?
An efficient solution is one that uses the least effort to get the most benefits.
In defining the solution, you must define … /what are the normal components of a computer solution
1) input - what info will be input
2) how info will be processed
3) output - what results will be output
4) info that needs to be stored (during the process, or to be kept for another time)
The divide-and-conquer approach is …
to repeatedly split a large problem into a number of smaller sub-problems
until a solution is identified
A computer program is …
a series of coded instructions for the computer
What is an algorithm?
An algorithm is
a sequence of instructions
that has a finite number of steps that if followed
produces a precise solution to the given problem
An algorithm must set out (3 responses)
An algorithm must set out
1) instructions - what actions to take
2) sequence - in what order
3) when to stop
2 types of algorithms
flowcharts
pseudocode
Pseudocode is …
a formal way of writing an algorithm
using English text, numbers and special characters
a language that resembles or models real programming language
a kind of structured English for describing algorithms
Flowchart is …
Diagrams that visually represent the series of instructions of algorithm
Difference between flowchart and pseudocode
Algorithms can be written using … (2 responses)
flowcharts and pseudocode
Algorithms, pseudocode and computer programs are written using __________ _____________ and ______________
Algorithms, pseudocode and computer programs are written using specific rules and statements
Computer programs are written in different ___________ __________
Computer programs are written in different computer languages