To a computer, a picture is just a giant grid of numbers called Pixels.
0 = White (Empty)
1 = Black (Filled)
Robo is trying to see a "Smiley Face". Let's draw it using numbers!
# A simple row of pixels
row1 = [1, 0, 1]
# A picture is a "List of Lists"
image = [
[1, 0, 1],
[0, 1, 0],
[1, 0, 1]
]
VISUALIZATION
(It's an X !)
Create `row1` representing two eyes. Left eye (1), Space (0), Right eye (1).
row1 = [1, 0, 1]
Create `row2`. Just a nose in the middle.
row2 = [0, 1, 0]
Create `row3` (The mouth is full: [1,1,1]) and combine them into `image`.
row3 = [1, 1, 1] image = [row1, row2, row3] print(image)
1. If we have a High Definition photo, what happens to the grid?