How to make Colorful spiral using Python

 In this blog I did the code for colorful spiral with Python. Below I given the code with video. Do read carefully the code or watch the video that I attached below and try it by your own.


Video:- 


Watch video for better understanding.


Code:- 

import turtle

colors=['red','purple','blue','green','orange','yellow']

turtle.speed(100)

t=turtle.Pen()

turtle.bgcolor(black)

for x in range(360):

    t.pencolor(colors[x%6])

    t.width(x/100+1)

    t.forward(x)

    t.left(59)


Output:- 


Subscribe my channel on YouTube and get more ideas πŸ‘‡


Comments

Post a Comment

Popular posts from this blog

How to take Google Classroom on Desktop Home screen.

How to Connect Scott user in Oracle database - SQL Language