pygame红橙黄绿青蓝紫画彩圆练习程序.py

"""pygame红橙黄绿青蓝紫.py,一个pygame画圆练习程序"""

__author__ = "李兴球"
__date__ = "2018年7月"

import pygame
from pygame.locals import *
screenWidth,screenHeight=840,120
pygame.init()
screen = pygame.display.set_mode((screenWidth,screenHeight))
pygame.display.set_caption("红橙黄绿青蓝紫")

pygame.draw.circle(screen,(255,0,0),(60,60),50)     # 红圆
 
pygame.draw.circle(screen,(255,165,0),(180,60),50)  # 橙圆

pygame.draw.circle(screen,(255,255,0),(300,60),50)  # 黄圆

pygame.draw.circle(screen,(0,255,0),(420,60),50)    # 绿圆

pygame.draw.circle(screen,(0,255,255),(540,60),50)  # 青圆

pygame.draw.circle(screen,(0,0,255),(660,60),50)     # 蓝圆

pygame.draw.circle(screen,(160,32,240),(780,60),50)  # 紫圆

clock = pygame.time.Clock()
运行中 = True
while 运行中:
    event = pygame.event.wait()
    if event.type==QUIT:运行中=False
    pygame.display.flip()
    clock.tick(10)
pygame.quit()