Quick actions

cmd+k|ctrl+k

Navigation

Languages

gui

Snippet info

Language

Python

Visibility

public

Author

gustav

Created

2026-07-26T02:04:38.354254Z

Updated

2026-07-27T22:34:13.422522Z

#Exercise!
#Display the image below to the right hand side where the 0 is going to be ' ', and the 1 is going to be '*'. This will reveal an image!

picture = [
  [0,0,0,1,0,0,0],
  [0,0,1,1,1,0,0],
  [0,1,1,1,1,1,0],
  [1,1,1,1,1,1,1],
  [0,0,0,1,0,0,0],
  [0,0,0,1,0,0,0]
]

for row in picture:
    for pixels in row: 
        if pixels == 0:
            print('', end='')
        else:
            print('*', end='')
            
        
INFO