@anagenb/

PythonTurtleTest1

Python (with Turtle)

No description

fork
loading
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#wandering turtles
import turtle
import random


turtle.clear()
turtle.color(1,0,1)
turtle.goto(0,0)
turtle.stamp()
turtle.shape("turtle")
#turtle.shapesize(2, 2)
turtle.up()
for idx in range (100):
    x = random.randint(-300, 300)
    y = random.randint(-300, 300)
    turtle.goto(x,y)
    turtle.color((x+300)/600,0,(y+300)/600)
    turtle.stamp()
result
console