Skip to main content

Featured

Awesome Python Turtle

Awesome Pythhon Turtle Colour Changing Vibrant Circle in Python import turtle tur=turtle.Turtle() scr=turtle.Screen() scr.bgcolor('black') tur.pencolor('white') x=0 y=0 tur.speed(0) tur.penup() tur.pendown() colors = ['red', 'purple', 'blue', 'green', 'orange', 'yellow'] while True: tur.pencolor(colors[y%6]) tur.forward(x) tur.right(y) x +=3 y +=1 if y==210: break tur.hideturtle() turtle.done() Output:

Python Turtle Programs

 Awesome Python Turtle Graphics

import turtle

tur=turtle.Turtle()

scr=turtle.Screen()

scr.bgcolor('black')

#tur.pencolor('white')

x=30

y=0

Color =['red', 'purple', 'blue', 'green']

tur.speed(0)

tur.penup()

#tur.goto(0,200)

tur.pendown()


while True:

tur.circle(x)

tur.pencolor(Color[y%len(Color)])

tur.forward(x)

tur.right(90)

x +=1

y +=1

if y==100:

break

turtle.done()



Output:




Comments

Popular Posts