
Introduction
Turtle graphics is a popular way for introducing programming to kids. It was part of the original Logo programming language developed by Wally Feurzeig, Seymour Papert and Cynthia Solomon in 1967.
Turtle is a special feathers of Python. Using Turtle, we can easily draw in a drawing board.First we import the turtle module. Then create a window, next we create turtle object and using turtle method we can draw in the drawing board.
Follow us on
Code
import turtle
# Creating turtle
t = turtle.Turtle()
s = turtle.Screen()
s.bgcolor(“black”)
t.pencolor(“red”)
a = 0
b = 0
t.speed(0)
t.penup()
t.goto(0,200)
t.pendown()
while(True):
t.forward(a)
t.right(b)
a+=3
b+=1
if b == 210:
break
t.hideturtle()
turtle.done()
Output

Follow us on
Download as file 🔻
You must be logged in to post a comment.