文章插图
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 + "/月")
文章插图
【第三周python作业】
推荐阅读
- 关于第三方物流的参考文献 近3年第三方物流论文参考文献
- 成都出发1 耿达熊猫基地门票价格
- 鲁迅逝世84周年,你有什么想说的?
- 我叫MT第三季第五集中的凤姐是谁?那个BL法师叫三哥的又是谁啊?
- 周大福黑金是足金吗 周大福黑金是黄金吗
- 西周定都在哪里怎么读 西周定都在哪里
- 周大福事件法官是谁
- 我报警抓第三者可以吗?
- 沈阳新生儿黄疸怎么办
- 为什么去周大福k金的不给换 为什么周大福3d硬金不按克卖