购物车程序:
要求:输入薪资,判断余额是否充足,选择商品,自动扣费,加入购物车,q返回,并显示购物车及余额
环境:Pycharm,Python3.7
product=[['Iphone',8888],['Ipad',18888],['Iwatch',12000],['xiaomi8',2799]]
salary=input("Please input your salary:")
flag=1
shopping_cart=[]
while flag:
if salary.isdigit():
salary=int(salary)
flag=0
else:
print("Salary can only be the digit!")
salary=input("Please input your salary:")
while True