Chapter 1 - Algorithms Flashcards
What is an algorithm?
A step by step procedure for solving problems
What is a list algorithm?
Instructions written in order
What is an iteration
Repeating something a set number of tines or until a condition is met
What is a selection?
A choice or decision
What is a sequence?
A basic instruction
Is “tip 4 large eggs whites into a mixing bowl” a sequence iteration or selection?
Sequence because it is a basic instruction
Is “ keep beating until mixture stands up in stiff peaks” a sequence iteration or selection?
Selection and iteration because its a decision and is repeating until condition met
What is correctness?
How successful it solves the problem
What is efficiency?
How quickly it solves the problem
What is a flow diagram?
Instructions that are written in boxes connected with arrows and pseudo code, where the programmer prepares to write the final script in a code-like language.
What shape is start and end boxes?
An oval
What shape is the simple sequence instruction?
A rectangle
What shape is a user inputs and outputs in a flow diagram?
Rhombus
What shape is selections?
Diamond
Selections have what two options
Yes and no
An algorithm diagram is also called what?
Flow diagrams
What is a selection statement?
A decision is made, leading to one of 2 alternative actions
What is a process
The action that is taken as a result of a decision