Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

9.03 Programming Iteration

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

In programming, iteration means ....

a)

Never repeating code

b)

repeating a piece of code

c)

switching between code sections

d)

hacking

2.

In programming, selection means ....

a)

Never repeating code

b)

repeating a piece of code

c)

switching between parts of the code based on conditions

d)

hacking

3.

to compare 2 values use

a)

=

b)

==

c)

===

d)

=?

4.

Iteration is also called

a)

if then else

b)

printing

c)

asking questions

d)

loops

5.

Which is an example of iteration?

a)

While

b)

if

c)

print()

d)

int()

6.

A 'Brute Force' attack uses

a)

one random guess

b)

Trojan horse

c)

repeated guessing

d)

Physical violence

7.

Which is NOT an example of Iteration

a)

While

b)

For

c)

Else

d)

Repeat

8.

How can you add a comment in Python

a)

type in red

b)

add speech marks

c)

add # before the comment

d)

write it in italics

9.

Why should you add comments in Python?

a)

To make the program work better

b)

To help people to understand what the code does

c)

To Show how clever you are

d)

To protect the code form errors

10.

Conditional Iteration is

a)

Iteration that lasts for a set number of times

b)

Iteration that depends on the value of a variable

c)

Iteration written by an amateur

d)

Iteration with mistakes in it