GoConqr has a new look! Let us know what you think.

Mind map

Unit 2A Programming-Arrays

sydelle wontumi English

Map content

Unit 2A Programming-Arrays

  1. An array is a data structure that allows you to hold several values, all of the same type with one name

  2. To print an element in the array you have to put the array name/indentifier and the index e.g. cars[0]- this will print the first item in the list named cars

    • the index starts at 0 not 1
  3. https://www.w3schools.com/python/python_arrays.asp https://www.bbc.co.uk/bitesize/guides/zfnny4j/revision/7

  4. Identifier- the name given to the array

  5. Values in elements can be overwritten at any point, simply by assigning another value to that element. e.g cars[0]← Ford (this now makes the first element in the list Ford, replacing it with the element that was there, the rest of the list stays the same).

  6. Two Dimensional arrays-A two-dimensional array can hold more than one set of data. This type of array is like a table, with data held in rows and columns.

    • To print an element in a two-dimensional array you have to put the array name/identifier and the index which is two numbers- Identifier[IntExp][IntExp]
      • tables ← [ [1, 2, 3], [2, 4, 6], [3, 6, 9], [4, 8, 12] ] tables[3][1] will print 8 because it is in the third group (index starting from 0)[4,8,12] and it is position 1 (index starting from 0)
  7. To find the length of the array in Pseudocode use the function LEN(identifier) e.g LEN(cars)

Information

Description
Mind Map on Unit 2A Programming-Arrays, created by sydelle wontumi on 14/01/2020.
Created by
sydelle wontumi
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?