Worksheets9.03 Programming Iteration
Total questions: 10
Worksheet time: 5mins
In programming, iteration means ....
Never repeating code
repeating a piece of code
switching between code sections
hacking
In programming, selection means ....
Never repeating code
repeating a piece of code
switching between parts of the code based on conditions
hacking
to compare 2 values use
=
==
===
=?
Iteration is also called
if then else
printing
asking questions
loops
Which is an example of iteration?
While
if
print()
int()
A 'Brute Force' attack uses
one random guess
Trojan horse
repeated guessing
Physical violence
Which is NOT an example of Iteration
While
For
Else
Repeat
How can you add a comment in Python
type in red
add speech marks
add # before the comment
write it in italics
Why should you add comments in Python?
To make the program work better
To help people to understand what the code does
To Show how clever you are
To protect the code form errors
Conditional Iteration is
Iteration that lasts for a set number of times
Iteration that depends on the value of a variable
Iteration written by an amateur
Iteration with mistakes in it
