作业-----购物程序
购物程序 #_author:Administrator#date:2019/10/25#购物车程序salary=int(input("please input your salary:"))print("购物清单如下")msg='''---------购物清单---------1.iphone11 58002.mac book 90003.coffee 384.python book 805,bicycle 1200 --------------------------'''print(msg)balance=0shopping_car=[]while True: i = int(input("请输入你要购买的商品编号:")) list = [0, 5800, 9000, 38, 80, 1200] object=['0','iphone11','mac book ','coffee ','python book','bicycle'] balance = salary - list[i] if balance<0: print("你的余额不足为,%d,请重新选择:你还需要购买东西吗?[yes/no]"%balance) say=input("请输入:") if say=="yes": continue else: print("欢迎再次光临") print("欢迎再次光临")