1/14
Looks like no tags are added yet.
What is a variable?
A value that stored in memory that can change while the program is running.
What is a constant?
A value that is assigned when the program is written and does not change while the program is running
What are advantages of using a constant?
The value only needs changing in one place, which avoids errors.
It makes the program easier to read
What is assignment?
Giving a variable or constant a value
What is casting?
Converting a variable from one data type to another
What are the three programming constructs?
Sequence, Selection, Iteration
What is sequence?
Instructions carried out in order, one after another.

What is selection?
The program chooses which code to rundepending on a condition. For example if age >= 18 then … else … endif

What is iteration?
Repeating a section of code (a loop).
What are the two types of iteration?
count-controlled loop + condition controlled loop
What is count controlled iteration? Give an example
A loop that repeats a set number of times, known in advance. For example for i = 1 to 10

What is condition controlled iteration? Give an example.
A loop that repeats until a condition is met, because the number of repeats isn't known in advance. For example while answer != "yes"

What is the difference between a WHILE loop and a DO … UNTIL loop?
A WHILE loop checks its condition before the code runs, so it may run zero times. A DO … UNTIL loop checks its condition after, so the code always runs at least once.
What is a WHILE loop?
It repeats while a condition is true (until it is false), and the condition is checked before the code runs.