diff --git a/quiz.py b/quiz.py index 8efe3ff..40c8883 100644 --- a/quiz.py +++ b/quiz.py @@ -1,10 +1,15 @@ # 直接运行以下代码,说说你的发现: list_hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98] dict_hero = {'赵一':30,'丁二':37,'孙五':52,'王猛':89,'周亮':98} -print(len(list_hero)) -print(len(dict_hero)) -dict_hero['孙五']=89 -dict_hero['这是']=96 -print(dict_hero) +# print(len(list_hero)) +# print(len(dict_hero)) +# dict_hero['孙五']=89 +# dict_hero['这是']=96 +# print(dict_hero) +q=input("你要买什么:") +if q in dict_hero: + print('五点七级的'+q+'sa'+str(dict_hero[q])) +else: + print("hfh")