Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GoArif/79bb7058e157c708cab40c22553cb180 to your computer and use it in GitHub Desktop.
Save GoArif/79bb7058e157c708cab40c22553cb180 to your computer and use it in GitHub Desktop.
import turtle
ak = turtle.Turtle()
ak.getscreen().bgcolor("#994444")
ak.speed(10)
ak.penup()
ak.goto((-200,100))
ak.pendown()
def star(turtle,size):
if size <= 10:
return
else:
turtle.begin_fill()
for i in range(5):
turtle.forward(size)
star(turtle,size/3)
turtle.left(216)
turtle.end_fill()
star(ak,300)
turtle.done()
@jarvissilva937
Copy link

Here is complete python turtle tutorial to draw a star: https://pythondex.com/draw-a-star-in-python-turtle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment