2020-12-20
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 + "/月")
网友评论