This code makes your computer draw a pattern of circles creating a beautiful image! You can change the colors whenever you would like.
In order to make the computer draw this, you must copy the code below, paste it into your python file, and run the code. After you run the code, it should bring you to the same scree was the video above.
Copy this code for FREE!:
#! /usr/bin/python3
import turtle
import math
import random
wn = turtle.Screen()
wn.bgcolor('black')
Albert = turtle.Turtle()
Albert.speed(0)
Albert.color('purple')
rotate=int(360)
def drawCircles(t,size):
for i in range(10):
t.circle(size)
size=size-4
def drawSpecial(t,size,repeat):
for i in range (repeat):
drawCircles(t,size)
t.right(360/repeat)
drawSpecial(Albert,110,10)
Steve = turtle.Turtle()
Steve.speed(0)
Steve.color('green')
rotate=int(90)
def drawCircles(t,size):
for i in range(4):
t.circle(size)
size=size-10
def drawSpecial(t,size,repeat):
for i in range (repeat):
drawCircles(t,size)
t.right(360/repeat)
drawSpecial(Steve,90,10)
Barry = turtle.Turtle()
Barry.speed(0)
Barry.color('black')
rotate=int(80)
def drawCircles(t,size):
for i in range(4):
t.circle(size)
size=size-5
def drawSpecial(t,size,repeat):
for i in range (repeat):
drawCircles(t,size)
t.right(360/repeat)
drawSpecial(Barry,70,10)
Terry = turtle.Turtle()
Terry.speed(0)
Terry.color('blue')
rotate=int(90)
def drawCircles(t,size):
for i in range(4):
t.circle(size)
size=size-19
def drawSpecial(t,size,repeat):
for i in range (repeat):
drawCircles(t,size)
t.right(360/repeat)
drawSpecial(Terry,50,10)
Will = turtle.Turtle()
Will.speed(0)
Will.color('orange')
rotate=int(90)
def drawCircles(t,size):
for i in range(4):
t.circle(size)
size=size-20
def drawSpecial(t,size,repeat):
for i in range (repeat):
drawCircles(t,size)
t.right(360/repeat)
drawSpecial(Will,30,30)
def drawCircles(t,size):
for i in range(4):
t.circle(size)
size=size-10