My first program and first blogs-三级菜单

Posted harryzhu

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了My first program and first blogs-三级菜单相关的知识,希望对你有一定的参考价值。

_author Administrator
#date 2018/9/7
items = {
‘陕西‘:{
‘西安‘:[‘周至‘,‘户县‘,‘蓝田‘ ],
‘宝鸡‘:[‘蔡家坡‘,‘陈仓‘,‘凤县‘]
},
‘山东‘:{
‘烟台‘:[‘栖霞‘,‘枣庄‘,‘c‘],
‘青岛‘:[‘a‘,‘b‘,‘d‘]
}
}
print(items)
a = ‘陕西‘
b = ‘山东‘
a1 = ‘宝鸡‘
a2 = ‘西安‘
flag = True
while flag:
choice1 = input(‘please input you decide1 [陕西/山东]:‘)
if choice1 == a:
print(items[a])
while flag:
choice2 = input(‘please input you decide2 [西安/宝鸡]:‘)
if choice2 == a1:
print(items[a][a1])
while flag:
choice3 = int(input(‘please input you number:‘))
if choice3 < 3:
print(items[a][a1][choice3-1])
flag = False
else:
flag = True
elif choice2 == a2:
print(items[a][a2])
while flag:
choice3 = int(input(‘please input you number:‘))
if choice3 < 3:
print(items[a][a2][choice3-1])
flag = False
else:
flag = True
else:
flag = True











































以上是关于My first program and first blogs-三级菜单的主要内容,如果未能解决你的问题,请参考以下文章

Pangu Separates Heaven and Earth(签到题)(The 2019 Asia Nanchang First Round Online Programming Contest)

How to use Nissan consult 3 plus to check, make key and program?

GTD190023:翻译Dynamic Programming: First Principles

The first C# program

Digital FiltersDetailed explanation on FIR Filter and IIR Filter

Digital FiltersDetailed explanation on FIR Filter and IIR Filter