Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Pseudocode WHILE Loops

Total questions: 10

Worksheet time: 9mins

Name
Class
Date
1.

When a piece of code runs unintentionally forever it is known as

a)

An infinite loop

b)

A long loop

c)

A broken loop

d)

A for loop

2.

A condition is

a)

a statement that is either True or False

b)

a string

c)

an integer

d)

a list

3.

What does the code output?

a)

0

1

2

3

b)

1

2

3

c)

0

1

2

4.

What does the code output?

a)

hi

b)

It won't output anything

c)

It will output an error!

d)

It will output "hi" infinitely

5.

What does the code output?

a)

hi

bye

b)

hi

bye

hi

bye

hi

bye

c)

hi

hi

hi

bye

6.

What does the code output?

a)

3

b)

6

c)

7

d)

4

7.

What does the code output?

a)

hi

hi

b)

hi

c)

hi

hi

hi

d)

hi

hi

hi

hi

8.

What does the code output?

a)

3

4

5

b)

1

2

3

c)

3

4

5

6

d)

3

4

4

9.

What is the value of i after this loop runs?

a)

i = 20

b)

i = 19

c)

i = 10

d)

i = 0

10.

What does this program output?

a)

x is 0

b)

x is 1

c)

x is 3

d)

x is 4