Commit 866eb4ac by BellCodeEditor

auto save

parent bac58aa2
Showing with 14 additions and 22 deletions
score={"a":57,"b":69,"c":100,"d":56}
k=input("name")
v=input("score")
if k in score:
if int(v)>score[k]:
score[k]=int(v)
print(str(k)+"同学"+"你"+str(v)+"分已上传")
else:
print(str(k)+"同学"+"你的分数未刷新")
else:
score[str(k)]=int(v)
print(k+"同学"+"你"+v+"分已上传")
print(score)
\ No newline at end of file
name=input("你叫什么名字?")
power=int(input("你的臂力是多少?"))
hero=["香蕉君",30,"猛男舞团",37,"肯德基爷爷",52,"黑帮摇",89,"刘海柱",98]
for i in range(len(hero)):
if i%2==1 and hero[i]>=power:
hero.insert(i-1,name)
hero.insert(i,power)
break
print(hero[6:15])
\ No newline at end of file
# 直接运行以下代码,说说你的发现:
a=["l","g","z","b","s","g"]
hero =["l"]
v=(a[0:3])
a.pop(-1)
hero.extend(v)
print(a)
w={'可口可乐':3,'旺仔牛奶':4,'农夫山泉':1,'辣条':3}
w.pop("农夫山泉")
print(w)
\ 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