Learn Programming in Python with Graphics

block_size = 25
num_blocks = 16
line = empty_graphic()
for col in range(num_blocks):
    if col % 2 == 0:
        color = black
    else:
        color = white
    block = rectangle(block_size, block_size, color)
    line = beside(line, block)
second_line = rotate(180, line)
finish_line = above(line, second_line)
show_graphic(finish_line)
Run This Example!
Directly in Your Browser
Graphical output from execution result

Learn with PyTamaro

Teach with PyTamaro

PyTamaro is a synergistic collaboration between university and school teachers

Both this platform and the library are open-source projects hosted on GitHubGitHub

PyTamaro logo

PyTamaro is a project created by the Lugano Computing Education Research Lab at the Software Institute of USI

Privacy Policy • Platform Version 3217fcf4 (November 24, 2026 at 6:34:26 AM UTC)