Commit 66c06628 by BellCodeEditor

save project

parent 99e31085
Showing with 46 additions and 0 deletions
...@@ -2,5 +2,51 @@ goods = {'å¯å£å¯ä¹':3,'旺仔牛奶':4,'农夫山泉':1,'è¾£æ¡':3,'å·´è¥¿çƒ ...@@ -2,5 +2,51 @@ goods = {'å¯å£å¯ä¹':3,'旺仔牛奶':4,'农夫山泉':1,'è¾£æ¡':3,'巴西çƒ
goods.pop("农夫山泉") goods.pop("农夫山泉")
print(goods) print(goods)
# 请将"农夫山泉"删掉,并打印出新的商品信息 # 请将"农夫山泉"删掉,并打印出新的商品信息
#weather={"北京":8,"上海":15,"广州":20,"深圳":21,}
#data = weather.pop("北京")
#print(data)
#print(weather)
#goods={"可口可乐":100,"旺仔":100,"农夫山泉":1002,"辣条":0.234654,"巴西烤肉":0.233434,"果冻":24}
#goods.pop("农夫山泉")
#del goods
#goods.clear()
#print(goods)
# score={"语文":91,"数学":88,"英语":85,}
# for i,d in score.items():
# print(i,d)
# score={"语文":91,"数学":88,"英语":85,}
# for i in score.keys():
# print(i)
# score={"语文":91,"数学":88,"英语":85,}
# for i in score.values():
# print(i)
student1={"语文":100,"数学":0.25,"英语":0.25}
student2={"语文":10,"数学":0.5,"英语":25}
student3={"语文":20,"数学":25,"英语":25}
score={"悟空":student1,"小白":student2,"小弟":student3,}
while True:
print("退出输q")
name = input("名字:")
print("*"*30)
if name in score:
sfdd=score[name]
for i,d in sfdd.items():
print(i,d)
print("*"*30)
elif name == "q":
break
else:
print("无名字,请重新输入")
print("*"*30)
print("结束")
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