wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

One-Dimensional Array in Python

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.
A FOR-NEXT loop is also described as being what?
a)
condition-controlled
b)
count-controlled
c)
Uncontrolled loop
d)
Controlled loop
2.
How are data items added to an array?
a)
Items are appended to the next free index
b)
In alphabetical order
c)
Data may only be read from an array, sorry
d)
Whichever way you want
3.
What is the index of the lower bound of the following array?
Dim Student(24) as string
a)
24
b)
25
c)
23
d)
0
4.
In names=[Fred,John,Sue] Index value 1 is?
a)
Fred
b)
John 
c)
Sue 
d)
none
5.
names=[Fred,John,Sue] print list[2] would return
a)
Fred
b)
Sue
c)
John
6.
names.append("Mary")
a)
Would add "names" to the list called "Mary"
b)
Would remove "Mary" from the list called "names"
c)
Would add "Mary" to the list called "names"
d)
Would add "Mary" to the list called "append"
7.
len(names)
a)
Finds the length of the list called len
b)
Finds the length of the list called Len
c)
Finds the length of the list called names
d)
Finds the length of the list called Names
8.
To declare an array, you must use
a)
brackets[ ]
b)
parenthesis()
c)
curly braces{ }
d)
pipes | |
9.
The location of an item in an array is called
a)
position
b)
index
c)
value
10.

Select the correct number model with the rectangular array

a)

4+4+4+4=16

b)

2+2+2+2=8

c)

2+2=4

d)

4+4=8