Commit c20bac8a by BellCodeEditor

auto save

parent 2ffb9ec5
Showing with 101 additions and 26 deletions
import pygame
from pygame import locals
pygame.init() # 初始化
# 创建窗口
screen = pygame.display.set_mode((640, 480))
# 载入图片、资源
bg_img = pygame.image.load('background.png') # 背景图
play_img = pygame.image.load('play.png') # 播放按钮
stop_img = pygame.image.load('stop.png') # 暂停按钮
last_img = pygame.image.load('last.png') # 上一曲按钮
next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 中间logo
while True:
for event in pygame.event.get():
????
# 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(stop_img, (270, 330)) # 暂停按钮
screen.blit(logo_img, (170, 60)) # 中间logo图
screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲
# 刷新画面
???
for i in range(4):
pass
# 2 8 16 box 进制转换 十进制转2 8 16
# 数据交换
# a=1
# b=2
# a,b=b,a
#print(a,b)
#冒泡排序
# d=[1,6,2,4,3]
# for i in range(4):
# for i in range(4-i):
# if d[i]<d[i+1]:
# d[i],d[i+1]=d[i+1],d[i]
# a='你好'
# #去除引号
# eval("print(a)")
# # 不换行
# print("aa",end=" ")
# print("aa")
# c=1.23556
# print(round(c,2)) #四舍五入
# print(ord('a'))#字符转编码
# print(chr(97))#编码转字符
# # 去除两侧指定字符
# print('baaaab'.strip('b'))
# 异常处理
# try:
# aa=input("请输入")
# print(aa/2)
# except:
# print("请输入数字")
# 数据转换
# s1="abdcccsadaas"
# print(s1.split()) #['abdcccsadaas']
# print(tuple(s1)) #('a', 'b', 'd', 'c', 'c', 'c', 's', 'a', 'd', 'a', 'a', 's')
# print(set(s1)) #{'a', 'c', 's', 'b', 'd'}
#a=['a','b','c','d','e','f']
#for i in a:
#print(i)
# b={"a":"b","a1":"b1","a2":"b2"}
# for i in b.keys():
# print(i,b[i])
# for i in b.values():
# print(i)
# for k,v in b.items():
# print(k,v)
# for i in range(15,10,-2):
# print(i)
#time
a,b,c,d=1,2,3,4
def aaa(a,b):
return b,a
c,d=aaa(a,b)
print(a,b)
a1=1
a2=1
a3=0
for i in range(3,6):
a3=a1+a2
a2=a3
a1=a2
print(a3)
\ 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