Commit 7a984dc3 by BellCodeEditor

auto save

parent 3c10bab6
Showing with 22 additions and 10 deletions
import turtle
turtle.speed(100)
color=['red','blue','grey','green']
turtle.bgcolor("black")
for i in range(300):
turtle.pencolor(color[i%4])
turtle.forward(i)
turtle.right(91)
turtle.done()
\ No newline at end of file
import pygame
pygame.init()
width=400
height=300
windowSize=[width,height]
screen=pygame.display.set_mode(windowSize)
colour=pygame.color.Color('#646400')
row=0
done=False
while not done:
increment=255/100
while row<=height:
pygame.draw.rect(screen,colour,(0,row,width,row+increment))
pygame.display.flip()
if colour[2]+increment<255:
colour[2]+=increment
row+=increment
for event in pygame.event.get():
if event.type==pygame.QUIT:
done=True
pygame.quit()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment