Commit c5baf764 by BellCodeEditor

save project

parent 60728dba
Showing with 10 additions and 3 deletions
......@@ -9,6 +9,12 @@
# break
#print(list_hero)
# 请注释掉上面的代码,并在下一行创建一个名为dict_hero的字典
dict_hero=['解舒岩':99,'马昭雨':10,'李成恩':100]
dict_hero['解舒岩'] = 99
print(dict_hero['解舒岩'])
dict_heros={'解舒岩':99,'马昭雨':10,'李成恩':100}
name = input("请输入玩家名:")
if name in dict_heros:
print("此人已在字典里了!")
else:
power = int(input("请输入臂力:"))
dict_heros[name] = power
print(dict_heros)
\ 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