Last active
November 16, 2017 17:32
-
-
Save Jeffallan/8d604ca429d765f6b9c0434530e0116a to your computer and use it in GitHub Desktop.
Give a flower, and the gift of Python, to that special someone in your life.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import turtle | |
def draw_square(some_turtle): | |
for i in range(1,5): | |
some_turtle.forward(100) | |
some_turtle.right(90) | |
def draw_art(): | |
window=turtle.Screen() | |
window.bgcolor("black") | |
brad = turtle.Turtle() | |
brad.shape("circle") | |
brad.color("purple") | |
brad.speed(10) | |
for i in range (1,37): | |
draw_square(brad) | |
brad.right(10) | |
nancy = turtle.Turtle() | |
nancy.color("red") | |
nancy.speed(10) | |
nancy.shape("circle") | |
for i in range (1,9): | |
nancy.circle(75) | |
nancy.right(45) | |
phil = turtle.Turtle() | |
phil.color("green") | |
phil.speed(10) | |
phil.right(90) | |
phil.forward(300) | |
window.exitonclick() | |
draw_art() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment