Remove .md and image files and move python files into main chapter folders
This commit is contained in:
parent
5978779a9a
commit
67806dab6a
159 changed files with 0 additions and 4562 deletions
28
thinkcspy/Chapter-6-Exercises/problem12.py
Normal file
28
thinkcspy/Chapter-6-Exercises/problem12.py
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# Runestone.Academy thinkcspy course
|
||||
# Chapter 6
|
||||
# Problem 12
|
||||
|
||||
import turtle
|
||||
|
||||
def drawSprite(t, numSides, legLength):
|
||||
angle = 360/numSides
|
||||
|
||||
for i in range(numSides):
|
||||
t.forward(legLength)
|
||||
t.up()
|
||||
t.forward(-legLength)
|
||||
t.right(angle)
|
||||
t.down()
|
||||
|
||||
|
||||
wn = turtle.Screen()
|
||||
|
||||
wn.bgcolor("tan")
|
||||
|
||||
avery = turtle.Turtle()
|
||||
avery.color("brown")
|
||||
|
||||
drawSprite(avery, 15, 120)
|
||||
|
||||
|
||||
wn.exitonclick()
|
||||
Loading…
Reference in a new issue