Arrays (OCR GCSE Computer Science): Flashcards

📚Flashcards
Arrays
Sign up to keep revising.Create a free account to study more flashcards and track your progress.

Practise the cards

14 cards from this deck

Show

Definition of an array

A data structure that stores multiple values of the same data type

Array length characteristic

Fixed; set at creation and cannot change

Two types of arrays

One-dimensional (1D) and two-dimensional (2D)

Structure of a 1D array

Like a list

Structure of a 2D array

Like a grid or table with rows and columns

How 2D arrays relate to databases

Can emulate database tables

Starting index of arrays

0

names[1] where names=['Bob','Alex','Chris']

Alex

len(names) for ['Bob','Alex','Chris']

3

sum([5,12,5,7,8])

37

matrix[1][1] for [[1,2],[3,4],[5,6]]

4

len(matrix) for [[1,2],[3,4],[5,6]]

3 (number of rows)

What 2D array rows represent

Records

What 2D array columns represent

Fields

Explore OCR GCSE Computer Science Revision Notes by Topics

Explore OCR GCSE Computer Science Model Answers by Topics

Explore OCR GCSE Computer Science Quizzes by Topics

Explore OCR GCSE Computer Science Exam Questions by Topics

Join 100,000+ GCSE students studying Flashcards with us.

Select your subjects, and get access to A+ resources today.