Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pygame #imports pygame
- from pygame.locals import * #imports variables
- import time #imports time
- quality1 = (1920, 1080) #makes a 1080p window
- light white = (255,255,255) #makes the screen white
- dark black = (0,0,0) #makes the screen black
- window1 = pygame.display.set_mode(resolution) #the screen starts out just white
- while True: #while the program is running
- window1.fill(white) #the screen will be white
- pygame.display.flip() #it will display on your screen
- time.sleep(5) #after 5 seconds...
- window1.fill(black) #the screen will turn black
- for event in pygame.event.get(): #in the event...
- if event.type == QUIT: #you close the window...
- pygame.quit() #the program stops running
- #i made this script after about 1 month of learning python
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement