Skip to content

Instantly share code, notes, and snippets.

@cibofdevs
Last active September 19, 2022 13:09
Show Gist options
  • Save cibofdevs/8bc05dbdfe6d9e3efdbab0845958cc8e to your computer and use it in GitHub Desktop.
Save cibofdevs/8bc05dbdfe6d9e3efdbab0845958cc8e to your computer and use it in GitHub Desktop.
# Write a program that uses the turtle module and a for loop to draw something.
# It doesn’t have to be complicated, but draw something different than we have done in the past.
# (Hint: if you are drawing something complicated, it could get tedious to watch it draw over and over.
# Try setting .speed(10) for the turtle to draw fast, or .speed(0) for it to draw super fast with no animation.)
import turtle
star = turtle.Turtle()
for i in range(50):
star.forward(50)
star.right(144)
turtle.done()
@raviprakashram
Copy link

import turtle
star = turtle.Turtle()
for i in range(50):
star.forward(50)
star.right(144)
turtle.done()

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