Skip to content

Python Labs

Interactive Python labs that run directly in your browser — no account or install needed. Each lab uses Skulpt to run real Python code with turtle graphics right on the page.

  • Turtle Commands


    Learn the core commands that move, turn, and color the turtle — the building blocks of every drawing in this course.

    Open Lab

  • Drawing a Square


    Give the turtle its first drawing commands and watch a square appear using forward() and right().

    Open Lab

  • Variables for Your Drawing


    Store distance and angle in variables so you can resize the whole square by changing just one number.

    Open Lab

  • Drawing Polygons with Loops


    Use a for loop and the 360/sides angle formula to draw any regular polygon with just 9 lines of code.

    Open Lab

  • Drawing a Stop Sign


    Combine variables, a for loop, and begin_fill() / end_fill() to draw a filled red octagon with STOP text.

    Open Lab

  • Changing Colors with If-Else


    Use if/else and the modulo operator % to draw a square with automatically alternating side colors.

    Open Lab

  • Functions and Flowers


    Define a petal() function and call it in a loop to grow a full flower on the canvas.

    Open Lab

  • Function Parameters: Four Colored Squares


    Add color and position parameters to a square() function and call it to place shapes anywhere on the canvas.

    Open Lab

  • Random Circles


    Use random.randint() to scatter 10 colorful circles at unpredictable positions — a different picture every run.

    Open Lab

  • Color Lists


    Create a list of colors, access items by index, and loop through the whole palette to paint a rainbow row of circles.

    Open Lab

  • Random Stars


    Write a star() function and call it with random positions, sizes, and colors to fill the canvas with star art.

    Open Lab

  • Reading Output and Error Messages


    Learn to tell apart black output and red errors, and use print() checkpoints to hunt down bugs.

    Open Lab

  • Getting Input from the User


    Use input() and int() to let the user decide how many shapes to draw while the program is running.

    Open Lab

  • Fractal Tree with Recursion


    Write a function that calls itself to draw a branching tree — each branch spawning two smaller branches.

    Open Lab

  • Hex Colors and Styled Text


    Use six-digit hex codes to access millions of colors and write bold, italic, and large text on the canvas.

    Open Lab

  • Plotting a Sine Wave


    Import math, loop through x values, and use goto() to plot a smooth sine curve across the canvas.

    Open Lab

  • Responding to Mouse Clicks


    Register a click handler with onscreenclick() and draw a colored circle wherever the user clicks.

    Open Lab