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()

 

本站所有作品,教程等皆为原创。只供个人及单位内部研究使用,对外展示或传播必需经本站同意,且注明来自本站。培训机构等用本站资源培训学生,需经本站授权。一旦付款,表示同意本站知识付费原则:数字商品,不支持退款。亦可直接向微信号scratch8付款购买。QQ群免费教学群:225792826 (提供真实姓名可入群)
李兴球的博客_Python创意编程技术前沿_pygame » pygame红橙黄绿青蓝紫画彩圆练习程序.py
scratch

学本领,探索更大的世界!

李兴球博客 风火轮编程主页