Worksheets2.2.3 Arrays
Total questions: 10
Worksheet time: 12mins
day = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
Using the one-dimensional array output the day beginning with the letter M
(a)
day = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
Using the one-dimensional array output the days beginning with the letter S
(a)
day = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
Using the one-dimensional array output the days beginning with the letter T
(a)
day = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
employee = ["Raj", "Megan", "Saba", "Jerome", "Adam"]
Saba works on Wednesday. Output this information using the template below.
(a)
day = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
employee = ["Raj", "Megan", "Saba", "Jerome", "Adam"]
Raj works on Monday. Output this information using the template below.
(a)
number= [ 27, 96, 45, 34,23,18,19]
Match the values to the array
number[0]
27
number[1]
96
number[3]
34
number[2]
45
number[5]
18
symbols = [ "A", "B", "C", "D", "E", "F"]
(a) index =0 to (b)
print ( (c) [ (d) ])
(e) index
colour= [ "Grey", "Blue", "Black" ,"Yellow", "Red", "Pink" ]
colour[5]
colour[4]
colour[0]
colour[1]
colour[2]
colour[3]
In an array, what is the first numbered position in which data can be stored?
Position 0
Position 1
Casting is converting to another data type . What is the value of x for each cast
x= str(345)
"345"
x=int("3")
3
x=real("4.52")
4.52
x=bool("True")
True
x=int(4.2)
4
