2.2.1 - Programming Techniques Flashcards
What is a sequence?
Program instructions are executed in order.
What is selection?
Running different lines of code, depending on a condition.
What is another word for selection?
Branching
What is iteration?
Repeating lines of code until a condition is met. (Loops)
What is a fixed loop?
A fixed loop runs a pre-defined number of times.
What are the two types of conditional loops?
While Loops
Do, Until Loops
How long does a conditional loop run for?
Until the condition is met.
How do do until loops work?
—- —-> lines of code to be repeated
until —-> exit condition.
How do while loops work?
—- —> lines of code to be repeated
—
endwhile. —-> end of loop
What happens when you go from a do until to a while loop?
Condition is inverted.