avatarJim McAulay🍁 I'm nobody. Are you a nobody too?

Summarize

Variations On A Theme In Python Turtle

Designs by experimentation

Source screenshot personal computer

In this lesson you are to create something unique and wonderful by working with a basic theme.

Here is a very simple module

import turtle as T
for i in range (91):
    T.forward (100)
    T.back (100)
    T.right (4)

Your project is to work with this module and create something wonderful. You can change the color, thickness and length of the lines. The background color, the location on the screen. You can create a single object or multiple objects.

The title image is just an example. It comprises a simple black background with 20 white objects at random locations with variable line lengths and degrees of completion.

import turtle as T
import random
T.bgcolor("black")
T.color ("white")
for i in range (20):
    x = random.randrange (-300,300)
    y = random.randrange (-300,300)
    rnd_range = random.randrange (10,90)
    T.penup()
    T.goto (x,y)
    T.pendown()
    for i in range (rnd_range):
        siz = random.randrange(5,16)
        T.forward(siz)
        T.back (siz)
        T.right (4)

Jim McAulay🍁 “My grandmother started walking 5 miles a day when she was 60. She has just turned 97. We have no idea where she is now?”

buy me a coffee

60–60

28–30

Technology
Python
Python Turtle
Jim Mcaulay
Illumination
Recommended from ReadMedium