CompSci Y08 Aut1 Flashcards
What is selection?
Selection is where a program checks a criteria, and the program responds accordingly.
What is a criteria?
The criteria is the check which the program performs.
What does the word criteria mean?
The criteria is what the program checks to see if it is the case. For example: score > 10
What does the command “ElseIf” do?
Allows additional criteria to be checked.
How would you make a program show “Well done” if the variable score is above 10?
What does “Else” do?
This tells the program what to do if none of the criteria have been met.
What is a variable?
In a computer program, a variable is used to store data.
How do you create a variable?
In the ‘data’ draw, click ‘Make a Variable’.
How do you output the contents of a variable?
What is iteration?
Iteration is makes commands repeat.
What are the two types of iteration?
Definite iteration and indefinite iteration.
What is definite iteration?
Definite iteration repeats lines of code for a fixed number of times.
How would you make the program output “Hello!” 5 times?
What is indefinite iteration?
Indefinite iteration repeats lines of code while a criteria is met.
How would you make the program run while lives are greater than 0?