wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Edublocks lesson 7 loops intro

Total questions: 17

Worksheet time: 9mins

Name
Class
Date
1.

Select the code to print even numbers in reverse order

a)
b)
c)
d)
2.

A while loop can be used in which of the following situations?

a)

Repeat a set of statements till a condition remains True.

b)

Repeat a set of statements a finite or an infinite number of times.

c)

Iterate through a string, list, and tuple.

d)

All of the above

3.

What is a variable?

a)

a type of graphics

b)

A box(memory location) where you store values

c)

Data type

d)

a type of memory

4.

Kind of loop used when you know the number of times you want it to repeat

a)

list

b)

for

c)

while

d)

if

5.

Loop that runs till the condition is true

a)

list

b)

while

c)

for

d)

if

6.

In Python, the two types of loops are _____ and _______

a)

while

b)

for

c)

list

d)

if

7.

Choose the correct output of the following code.

for i in range(10,15):       

print(i)

a)

10

11

12

13

14

15

b)

10

11

12

13

14

c)

11

12

13

14

15

d)

11

12

13

14

8.

What data type does an input block return?

a)

String

b)

Integer

c)

Float

d)

Boolean

9.

Which block is needed to convert an input into a integer number?

a)
b)
c)
d)
10.

What is the value of no_1?

a)

8

b)

11

c)

19

d)

88

11.

What datatype would userNumber be after this block is run

a)

string

b)

integer

c)

real

d)

a number if they enter a number

12.

In what section would you find the

if

block

a)

Statement

b)

Files

c)

Logic

d)

Variables

13.

What will the value of answer be when this program is run?

a)

8

b)

11

c)

19

d)

88

14.

What shape is this python program finding the area for?

a)

Circle

b)

Square

c)

Triangle

d)

Hexagon

15.

What will this python program output?

a)

9.75

b)

17

c)

44

d)

86

16.

What will the value of answer be once this program is run?

a)

5

b)

8115

c)

24

d)

440

17.

Which variable has the highest value before the prorgam is run.

a)

no_1

b)

no_2

c)

no_3