Quick actions

cmd+k|ctrl+k

Navigation

Languages

#Exercise (tree)

Snippet info

Language

Python

Visibility

public

Author

namargup

Created

2026-06-20T09:29:21.759159Z

Updated

2026-06-21T09:54:43.311583Z

#exercise
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 image in picture:
    for pixel in image:
        if pixel == 1:
            print('*', end= ' ')
        else:
             print(' ', end= ' ' )
    print(" ")
             
                       
INFO