In this program we are going to make a very unique pattern in python using turtle library.
Its super easy to code and so much fun. Try out this program and the code is following :
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()
0 Comments