一:制作要求
1.三级菜单 2.可依次选择进入各子菜单 3.所需新知识点:字典,列表
*本文通过三种方法完成,第一种:只使用循环,第二种:使用列表,第三种:使用字典
二:FlowChart流程图
与上图对应,实现方式图解:
![](https://www.jb51.cc/res/2019/02-08/14/31f85deb164fc771868bca72613380a0.png)
while用来判断输入的数据和允许输入数据中的哪一项匹配,if来进行判断是否退出本次循环,
三:具体实现代码:
1.没有使用列表字典
msg=
msg_1=
msg_2_2=
msg_2_1=
select_input=input(
select_input== select_input_1 = input( select_input_1 == select_input_2 = input( select_input_2==
select_input_1 == select_input_2 = input( select_input_2 ==
select_input_1 == select_input_2 = input( select_input_2 ==
select_input_1==
select_input == select_input_1 = input( select_input_1 == select_input_2 = input( select_input_2 ==
select_input_1 == select_input_2 = input( select_input_2 ==
select_input_1 == select_input_2 = input(