Activity : Arrays
[1] The important fact about arrays is that all the elements must be of the same data type.

Only one of these lists is an array. Is it A, B or C?

A

Tina Jenkins
56%
89%
92%
64%

B

Laura Watkins
John Jones
Tommy Smith
Ceri Thomas
Chelsea Chubb

C

£32.00
£21.50
£24.00
Trousers
£56.00
Click on this area to see if you were correct...
 
[2] The questions on this worksheet use these two arrays...

ITEM

Subscript ITEM
1 Pencil
2 Pencil Sharpener
3 Notepad
4 Fridge Magnet
5 Pencil Case
6 Mug
7 T-shirt
8 Scarf
9 Cap
10 Gloves

PRICE

Subscript PRICE
1 £0.25
2 £0.45
3 £1.00
4 £0.75
5 £2.50
6 £1.99
7 £5.99
8 £3.99
9 £6.99
10 £5.99
What is ITEM[6] ?
What is PRICE[4] ?
If PRICE[n] = £3.99 then the value of n is...
If ITEM[n] = "Cap" then the value of n is ...
If ITEM[n] = "Notepad" then what is PRICE[n] ?
If PRICE[n] = £2.50 then what is PRICE[n+1] ?

(If all your answers are correct, the green light will show...)

   Back