005

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

import pygame,sys

from pygame.locals import*

pygame.init()
DISPLAYSURF = pygame.display.set_mode((400,300))
pygame.display.set_caption ('HELLO WORLD')

WHITE = (255,255,255)
GREEAN = (0,255,0)
BLUE = (0,0,128)

fontObj=pygame.font.Font ('freesansbold'.ttf,32)
textSurfaceObj = fontObj.render ('Hello World!',True,GREEN,BLUE)
textRectObj = textSurfaceObj.get_rect()
tectRectObj.center=(200,150)

while True:
DISPLAYSURF.fill(WHIE)
DISPLAYSURF.blit (tectSUrfaceObj,textRecObj)
for event in pygame.event.get():
if event.type==QUIT:
pygame.quit()
sys.exit()
pygame.display.update()

You might also like