Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try:
- import pygame, time
- from pygame.locals import *
- pygame.init()
- a = 1.0
- #Colors
- BLACK = ( 0, 0, 0)
- WHITE = (255, 255, 255)
- GREEN = (0, 255, 0)
- RED = ( 255, 0, 0)
- #screen
- size = (700, 500)
- screen = pygame.display.set_mode(size)
- #screen background color
- screen.fill(WHITE)
- pygame.display.update()
- #Font
- myfont = pygame.font.SysFont('Anton', 30)
- for i in range(100):
- screen.fill((255, 255, 255))
- textsurface = myfont.render(str(a) + ' %', False, BLACK)
- screen.blit(textsurface,(320,210))
- pygame.display.update()
- a = a + 1
- time.sleep(0.05)
- except:
- print('===> A problem Occurred <===')
- print('===> Exiting <===')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement