文章插图
title = ['车次 ', '出发站-到达站 ', '出发时间 ', '到达时间 ', '历时 ']num = ['T40', 'T298', 'Z158', 'Z62']place = ['长春-北京', '长春-北京', '长春-北京', '长春-北京']start = ['00:12', '00:06', '12:48', '21:57']final = ['12:20', '10:50', '21:06', '06:08']time = ['12:08', '10:44', '08:18', '08:20']print(title[0], ' ', title[1], ' ', title[2], ' ', title[3], ' ', title[4])print(num[0], ' ', place[0], ' ', start[0], ' ', final[0], ' ', time[0])print(num[1], ' ', place[1], ' ', start[1], ' ', final[1], ' ', time[1])print(num[2], ' ', place[2], ' ', start[2], ' ', final[2], ' ', time[2])print(num[3], ' ', place[3], ' ', start[3], ' ', final[3], ' ', time[3])m = dict(zip(num, start))n = dict(zip(num, place))a = input('请输入要购买的车次:')b = input('请输入乘车人(用逗号):')aplace = n[a]astart = m[a]print(f'您已购{a}次列车 {aplace} {astart}开, 请{b}尽快换取纸质车票 。【铁路客服】')
文章插图
TV = [ ('《Give up,hold on to me》', 1.4), ('《The private dishes of the husbands》', 1.343), ('《My father-in-law will do martiaiarts》', 0.92), ('《North Canton still believe in love》', 0.862), ('《Impossible task》', 0.553), ('《Sparrow》', 0.411), ('《East of dream Avenue》', 0.164), ('《The prodigal son of the new frontier town》', 0.259), ('《Distant distance》', 0.394), ('《Music legend》', 0.562)]TV = sorted(TV, key=lambda s: s[1], reverse=True)for tv in TV: print(tv[0] + '收视率:' + str(tv[1]) + '%')
文章插图
print("定制自己的手机套餐:")timer = ["0分钟", "50分钟", "100分钟", "300分钟", "不限量"]flow = ["0M", "500M", "1G", "不限量"]message = ["0条", "50条", "100条"]print("A.请设置通话时长:")for index,item in enumerate(timer): print(str(index + 1) + '.', item)charges_num = input("输入选择的通话时长编号:")if charges_num == "1": timer_c = timer[0]if charges_num == "2": timer_c = timer[1]if charges_num == "3": timer_c = timer[2]if charges_num == "4": timer_c = timer[3]if charges_num == "5": timer_c = timer[4]print("B.请设置流量包:")for index,item in enumerate(flow): print(str(index + 1) + '.', item)flow_num = input("输入选择的流量包编号:")if flow_num == "1": flow_c = flow[0]if flow_num == "2": flow_c = flow[1]if flow_num == "3": flow_c = flow[2]if flow_num == "4": flow_c = flow[3]print("C.请设置短信条数:")for index,item in enumerate(message): print(str(index + 1) + '.', item)message_num = input("输入选择的短信条数编号:")if message_num == "1": message_c = message[0]if message_num == "2": message_c = message[1]if message_num == "3": message_c = message[2]print("您的手机套餐定制成功:免费通话时长为" + timer_c + "/月,流量为" + flow_c + "/月,短信条数" + message_c + "/月")
经验总结扩展阅读
- 致命女人每周更新时间是什么时候?
- 电视剧致命女人周几更?
- 蒙面唱将周传雄是哪一期?
- 晓松说周杰伦是那一期?
- 袁泉和周润发演的电影是哪部?
- 文豪野犬第三季的内容是什么?
- 周仰杰的鞋子什么档次的?
- 周金生是个什么牌子的珠宝?
- 开讲啦周杰伦是哪一期?
- 那年花开月正圆杜明礼知道周莹身世第几集?