抠脚购物车的开始
1 # Author:Hao Zhe yu 2 dict_jiaju = { 3 "桌子":{ 4 "园形":{200,234,235,324,534,234}, 5 "方形":{300,234,2342,2342,2524,234}, 6 "长方形":{234,234242,234243,24324,234} 7 }, 8 "板凳":{ 9 "教学板凳":{30,23,42,234}, 10 "电脑桌板凳":{40,24,4523}, 11 "团桌板凳":{50,234,2342,234} 12 }, 13 '床':{ 14 '双人': 15 {300,400,500,200}, 16 '单人': 17 {200,160,200,210}, 18 '弹簧床': 19 {400,454,2342,12313} 20 } 21 22 } 23 print (dict_jiaju) 24 while True: 25 for i in dict_jiaju : 26 print (i)#打印第一层的内容 27 choose = input("---选择进入一层》》》:")#选择进入那个菜单 28 if choose in dict_jiaju:#判断打开的菜单 29 while True:#循环模式 30 for a in dict_jiaju[choose]:#循环打开的菜单 31 print (a)#输出到面板 32 choose_1 = input('-------选择二层产品:') 33 if choose_1 in dict_jiaju[choose]: 34 #while True: 35 for a1 in dict_jiaju[choose][choose_1]: 36 print ("\t",a1)#这个商品的价位 37 choose_2 =input ("返回please按b:") 38 if choose_2 == "b": 39 print("----------------------------------") 40 pass 41 42 if choose_1 == "b": 43 break
如果当你发现自己的才华撑不起野心时,那就请你安静下来学习