创建文件a.txt,b.txt.c.txt用于存放应该持续保存的信息
a.txt :用户密码输入错误3次就锁定
b.txt :购物时的活动,每个用户只能参与一次
c:txt :购物完后的发票在这里查看
购物车程序:
1 ready = 0 2 salary = input("how much is you salary:") 3 out = 0 4 #count = 0 5 if salary.isdigit(): 6 salary = int(salary) 7 else: 8 exit("input string not digital....exit") 9 list = [["精选猪肉3斤", 100], ["牛肉3斤", 200], ["鸡肉三斤", 50]] 10 shoppingcar = [] 11 while True: 12 print("----------------------------------------------------------------------------") 13 print("Welcome to xiaodai store") 14 print("