Arrays
- Created by: Tomiwaq
- Created on: 05-05-19 16:31
View mindmap
- Arrays
- Data values
- Arrays are used to store multiple data values
- It is a data structure that can store a collection of data values under one name
- Each piece of data in an array is called an element
- Most helpful when you have lots of related data
- Some languages require you to declare arrays
- One dimensional
- A lot like lists
- Creating arrays
- the first line pf the code creates the array
- Retrieving elements
- Name the array and the elements position. It starts from 0
- Changing elements
- By reassigning the array position to a different data value
- Two dimensional
- A lot like a list of lists
- Positions are written as [a,b] or [a][b]
- a represents the position of the one dimensional list
- b represents its position within the list
- Data values
Similar Computing resources:
Teacher recommended
Comments
No comments have yet been made