Commit 3e639514 by BellCodeEditor

save project

parent 33cdcbda
Showing with 23 additions and 6 deletions
# 直接运行以下代码,说说你的发现: import pygame
list_hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98] from pygame import locals
dict_hero = {'赵一':30,'丁二':37,'孙五':52,'王猛':89,'周亮':98}
print(len(list_hero)) pygame.init()
print(len(dict_hero))
\ No newline at end of file background = pygame.image.land('bg.png')
screen.bli t(background,(0,0))
screen.blit(right,(290,120))
screen.bilt(food,(360,300))
right = pygame.image.load('right.png')
food = pygame.image.load('apple.png')
screen = pygame.display.set_mode((660<480))
while True:
for event in pygame.event.get():
print(event)
if event.type == locals.QUIT
exit
screen.blit(background,(0,0))
pygame.display.update()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment