Create Amazing Designs Using Python Programming 😍

CREATE AMAZING DESIGN


USING TURTLE


    
import turtle

window = turtle.Screen()
window.setup(600,600)
spiral = turtle.Turtle()
spiral.speed(10)
window.bgcolor("black")
colours=["yellow","blue","white","green"]
c=0
# @concepts.of.programming (Follow us on instagram)
for i in range(50):
 spiral.forward(i * 10)
 spiral.right(144)
 spiral.color(colours[c])
 if c== 3:
     c = 0
 else:
     c += 1

turtle.done()

Following output is only for reference:




💬 Do follow us on Instagram:
    
        IG-@concepts.of.programming

Comments

Popular posts from this blog