遇到这种题优先定义变量,类似于建立数据库 name = ['A1', 'A2', 'A3', 'A4', 'A5', 'A6'] nameK = {'A1': 0, 'A2': 1, 'A3': 2, 'A4': 3, 'A5': 4, 'A6': 5} price = [2, 3, 4, 5, 8, 6] count = [0] * 6 money = [1, 2, 5, 10] moneyK = {1: 0, 2: 1, 5: 2, 10: 3} moneyC = [0] * 4 # 可用余额 amount = 0 # 初始化 def r(sl): global count...