100-Days-Of-Code/Visual Studio Code Projects/turtle-crossing-start/blah.py
Arcron ArchLinux 4d3a07e207 Fixed Error
2024-10-29 18:08:45 +05:30

29 lines
461 B
Python

from turtle import Turtle
t = Turtle()
t.penup()
t.goto(0, 0)
def draw_square(size, color):
t.pendown()
t.color(color)
for x in range(4):
t.forward(size)
t.right(90)
t.penup()
def draw_circle(size, color):
t.pendown()
t.color(color)
for x in range(36):
t.forward(size)
t.right(10)
t.penup()
while True:
t.speed(100)
draw_square(100, "red")
draw_circle(20, "blue")
t.right(10)