PSPD Flashcards
What are the steps in problem solving?
- Define the problem
- Analyze the problem
- Select the most efficient solution
- Develop an algorithm to solve the problem
- Test and validate the solution
What is an algorithm?
A design of a set of instructions that must be followed when solving a problem
What is a program?
A method or set of instructions when solving a problem and written in a programming language.
What are some characteristics of an algorithm?
Clear and unambiguos- algorthyms must me clear and distint and lead to a single conclusion
Well defined output- must me clear on what output will be produced and be well defined
sequential- must be step by step
language independent- must be simple and in a readable manner.
Finiteness- must be finite and not result in infinite loops or anything similar.
What are the 3 control structures of an algorithm?
Sequencing
Selection
Iteration/looping
What is sequencing?
Accepting one statement in a perfect order on after the other from start to stop
What is selection?
The decision making process and evaluate the condition if its true and the alternatives otherwise.
What is iteration/looping?
A block of statements being done over and over until a particular value is reached or over a set amount of time.
What are the words associated with looping?
For, while, repeat
What is a pseudocode?
The use of natural language contructs modeled to look like statements in many programming language.
what are the types of statements?
Input
Output
Processing
What is the input statement?
requires an action by the user to type in instructions.
What is the output?
Prints information on the screen
What is the processing statement?
carries out calculation or assignments that require turning data to information.
What is a characteristic of a pseudocode?
Pseudocodes can be modular- large tasks can be subdivided into smaller tasks and can be put together to form the complete program.