Commit b95a8971 by BellCodeEditor

save project

parent 6f4ea99b
Showing with 38 additions and 4 deletions
a=int(input("s,s="))
b=int(input("e,s="))
c=a-b
h=int(c/3600)
min=int((c-3600*h)/60)
s=int(c-3600*h-60*min)
print(h,min,s)
\ No newline at end of file
import turtle
a=turtle.Pen()
a.fillcolor("yellow")
a.begin_fill()
a.circle(-100,720,steps=5)
a.end_fill()
a.penup()
a.goto(0,-138)
a.fillcolor("red")
a.begin_fill()
a.circle(38,360,steps=5)
a.end_fill()
turtle.done()
\ No newline at end of file
......@@ -12,10 +12,17 @@ last_img = pygame.image.load('last.png') # 上一曲按钮
next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 中间logo
FPS=pygame.time.Clock()
pygame.mixer.music.load("歌曲1.wav")
volume=0.0
volume=0.4
click=0
oe=logo_img
pygame.mixer.music.set_volume(volume)
while True:
for event in pygame.event.get():
......@@ -30,6 +37,12 @@ while True:
pygame.mixer.music.set_volume(volume)
if pygame.mixer.music.get_busy() == False:
pygame.mixer.music.play()
if event.type==locals.MOUSEBUTTONDOWN:
click+=1
if click%2==0:
pygame.mixer.music.unpause()
if click%2==1:
pygame.mixer.music.pause()
# 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(stop_img, (270, 330)) # 暂停按钮
......@@ -38,4 +51,3 @@ while True:
screen.blit(next_img, (420, 350)) # 下一曲
# 刷新画面
pygame.display.update()
FPS.tick(3)
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