Commit de6a8807 by BellCodeEditor

auto save

parent a972db2b
Showing with 39 additions and 4 deletions
# # print(2,3,4,5,sep=",")
# for i in range(9):
# print(i,end=',')
# print(9)
# a=19.78
# print("我的年龄:%.0f"%a)
# print()
try:
a=int(input("输入一个分子:"))
b=int(input("输入分母:"))
c=a/b
except ZeroDivisionError:
print("分母不能为零")
except TypeError:
print("输入错误!")
else:
print(c)
\ No newline at end of file
a=[2,1,34,4,2,3,8]
a.sort(reverse=True)
print(a)
for i in range(0,len(a)-1):
for j in range(0,len(a)-i-1):
if a[j]>a[j+1]:
a[j],a[j+1]=a[j+1],a[j]
print(a)
\ No newline at end of file
c=''
k=b.read()
for a in k:
if '/a' in a:
a=a.replace('/a','/b')
c+=a
......@@ -2,10 +2,12 @@ import pygame
# 初始化pygame,为使用pygame做准备
pygame.init()
bg=pygame.image.load('bg.png')
# 创建一个窗口
screen=pygame.display.set_mode((660,480))
while True:
for i in pygame.event.get():
if i.==pygame.QUIT:
exit()
\ No newline at end of file
if i.type==pygame.QUIT:
exit()
screen.blit(bg,(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