Commit 9601bcfc by BellCodeEditor

auto save

parent 98f24605
Showing with 44 additions and 19 deletions
j={"语文":20,"数学":30,"英语":60}
k={"语文":30,"数学":10,"英语":70}
l={"语文":20,"数学":30,"英语":90}
a={"张三":j,"林北":k,"老八":l}
while True:
print("p退循环")
e=input()
if e in a:
b=a[e]
for r,t in b.items():
print("*"*30)
print(r,t)
elif e=="p":
break
else:
print("不存在")
\ No newline at end of file
# 这是悟空为花果山小猴做臂力测试的程序代码
name=input('你叫啥名啊?')
power=int(input('你臂力多少啊?'))
list_hero=['猴三',10,'猴一',21,'猴五',22,'猴队长',29,'猴七',30]
for i in range(len(list_hero)):
if i%2==1 and list_hero[i]>=power:
list_hero.insert(i-1,name)
list_hero.insert(i,power)
break
print(list_hero)
# 请注释掉上面的代码,并在下一行创建一个名为dict_hero的字典
dict_hero=
print(dict_hero)
hsjxzs={"新车":68,"万代南梦宫":98,"背景":0,"传奇":999,"GP03石触兰":2000}
uc=input("我超")
if uc in hsjxzs:
print("谢谢你,陌生人,一共"+str(hsjxzs[uc])+"元")
else:
print("rnm,陌生人,没有")
hsjxzs.pop("背景")
print(hsjxzs)
# 直接运行以下代码,说说你的发现: l={"提耶利亚":100,"阿里路亚":90,"哈利路亚":60}
list_hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98] I=input("n")
dict_hero = {'赵一':30,'丁二':37,'孙五':52,'王猛':89,'周亮':98} i=input("f")
print(len(list_hero)) if I in l:
print(len(dict_hero)) if int(i)>l[I]:
\ No newline at end of file l[I]=i
print("分数已录入")
else:
print("未高于上次分数,不予录入")
else:
l[I]=int(i)
print(l)
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