RI Y2 CEP Lesson 8 Slides 2020
Uploaded by dontsueme · 10 December 2024
Preview
Lesson 82 Dimensional Array – Nested Lists
A table with 4 rows and 4 columns
Representing . . . A table with 4 rows and 4 columns25518518502559618518525501859625518518596We can represent a table with n rows and m columns into a n by m matrix.25518525596185018518525502551851859618596n rows (horizontal)by m columns (vertical)
A Matrix to a 2 dimensional array[[255,185,185,0], [255,96,185,185], [255,0,185,96], [255,185,185,96]]Nested lists in Python: a list in a list 25518525596185018518525502551851859618596
Lesson Objective•manipulate two dimensional array : nested lists•using matrix as example
Notation of Matrix
Operations and Methods to Matrices•print•finding maximum•addition , subtraction•scalar multiplication•transpose•matrix multiplication (if possible)
creating a null matrix : matrix with all 0creating a m row by n column null matrix •if m = n, the matrix will be square•a matrix need not be square this does not work. Why?so how?
printing a matrixprinting a matrix row by row:
Content continues in the PDF.
Related notes
- SST (for revision practice) 2024 S3 Computing EOY P2 QP_FinalExam Papers · 2024
- Computing o level notes Notes/Practices · 2023
- BVSS Prelim P1 MSExam Papers · 2024
- BVSS Prelim P1 CPExam Papers · 2024
- CWSS Prelim P1 CPExam Papers · 2024
- CWSS Prelim P1 MSExam Papers · 2024

