1-dimensional and 2-dimensional arrays
You can think of a 1D array as a list. Strictly speaking, a list only contains elements of the same type...like [12,56,32,76] is a list of integers. An array that contains multiple data types is known as a record. For example, ['Bob', 16, 'Alice', 15].
You can think of a 2D array as a list of lists or as a table with rows. For example: [['Bob' , 16] , ['Alice', 15]] This can also be written in Python like a table: [ ['Bob', 16], ['Alice', 15] ] You can now see the rows. There are no column headings but context would tell you. For example, this is name and age. Practice tasks are below the video. |
Revise the basics of lists on ON THE CSNEWBS SITE
|
Watch the video and take some notes
Now take the test.
You will be expected to create a Python file (Thonny or Repl.it) as part of this quiz.
Use a laptop/desktop and not your phone.
You can use trinket.io online if you do not have Thonny
Programming tasks
You will have been given the task sheets and the Python files in class. These videos will help you if you are stuck.
Candidates votes |
Fix the errors |
|
|
Hot peppers |
Language students |
|
|
Oysters |
Pass or fail |
|
|
Triangles |
Childrens books |
|
|