if __name__ == '__main__':print("定制手机套餐")print("")#定义电话时长:字典callTimeOptions={'1':'0分钟','2':'50分钟','3':'100分钟','4':'300分钟','5':'不限量'}key=input("请输入电话时长的选择编号:")value=callTimeOptions.get(key)if value:print(f"你选择的时长为:{value}")else:print("输入错误,请重新输入")#定义流量包databag={'1':'0M','2':'500M','3':'1G','4':'5G','5':'无限量'}key=input("请输入流量包的选择编号:")value=databag.get(key)if value:print(f"你选择的流量包是:{value}")else:print("输入错误,请重新输入")#定义短信条数:列表num=['1','2','3']messageSelect=["0条","50条","100条"]print("请输入短信条数的编号是:")selectNum=input()print(f"你选择的短信条数为:{messageSelect[int(selectNum)-1]}")#通过下角标访问#输出最终得到的3个结果print(f"您的手机套餐定制成功:免费通话时长为:每月{callTimeOptions[key]},流量为每月{databag[key]},短信条数为每月{messageSelect[int(selectNum)-1]}")