Featured Post

Python Turtle - Automatically Change Turtle Graphics Window Color | Changing Color By #BKTutorial






Source Code:

import turtle
import time
t=turtle
t.hideturtle()
t.bgcolor('white')

for a in range(100):
    if a%2 is 1:
        t.title('Gray Background')
        t.bgcolor('gray')
        time.sleep(2)
        t.title('White Background')
        t.bgcolor('white')
        time.sleep(2)
        t.title('Yellow Background')
        t.bgcolor('yellow')
        time.sleep(2)
        t.title('Cyan Background')
        t.bgcolor('cyan')
        time.sleep(2)
        t.title('Orange Background')
        t.bgcolor('orange')
        time.sleep(2)
        t.title('Silver Background')
        t.bgcolor('silver')
        time.sleep(2)
        t.title('Purple Background')
        t.bgcolor('purple')
        time.sleep(2)
        t.title('Greeen Background')
        t.bgcolor('green')
        time.sleep(2)
    else:
        t.bgcolor('red')



 

Comments