1/7
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is an array?
A data structure that can store a collection of data values all under one name.
What is each piece of data in an array called?
An element
What are arrays used for?
To store multiple data values
What is the code for creating an array named ‘rowers’ with 4 elements?
array rowers[4]
What is the code for assigning line 0 of the array ‘rowers’ with the string of “Ivan”?
rowers[0] = “Ivan”
What number do the positions start from?
0
What is the code which retrieves line 0 of the array ‘rowers’?
print(rowers[0])
What are two benefits of combining an array with a FOR loop?
It can search for specific elements/make a similar change to lots of elements.