码迷,mamicode.com
首页 > 其他好文 > 详细

Firs week-Homework(三级菜单)

时间:2017-10-28 20:28:50      阅读:142      评论:0      收藏:0      [点我收藏+]

标签:==   location   last   and   pow   lcs   bio   display   let   

要求:

  • 三级菜单
  • 可依次选择进入各子菜单,并且可以退出

Code:

技术分享
  1 #Author:Daniel
  2 # -*- conding: utf-8 -*-
  3 #time:2017.10.28-16:49
  4 LOL = {
  5     LPL:{
  6         RNG:{
  7             Top:[Letme],
  8             Jun:[Mlxg],
  9             Mid:[Xiaohu],
 10             Adc:[Uzi],
 11             Sup:[Ming],
 12         },
 13         EDG:{
 14             Top:[Mouse],
 15             Jun:[Clearlove7],
 16             Mid:[Souct],
 17             Adc:[Iboy],
 18             Sup:[Meiko],
 19         },
 20         We:{
 21             Top: [957],
 22             Jun: [Condi],
 23             Mid: [Xiye],
 24             Adc: [Mysitc],
 25             Sup: [Zero],
 26         },
 27     },
 28     LCK:{
 29         SKT:{
 30             Top: [Huni],
 31             Jun: [Blank],
 32             Mid: [Faker],
 33             Adc: [Bang],
 34             Sup: [Wolf],
 35         },
 36         Samsung:{
 37             Top: [Semb],
 38             Jun: [Kakao],
 39             Mid: [Crown],
 40             Adc: [Prioy],
 41             Sup: [Madlife],
 42         },
 43         KT:{
 44             Top: [Mrain],
 45             Jun: [Dandy],
 46             Mid: [Pown],
 47             Adc: [Deft],
 48             Sup: [Mata],
 49         },
 50     },
 51     LCS:{
 52         FNC:{
 53             Top: [Soaz],
 54             Jun: [Amazing],
 55             Mid: [Caps],
 56             Adc: [Rekkles],
 57             Sup: [Jesiz],
 58         },
 59         TSM:{
 60             Top: [Hauntzer],
 61             Jun: [Svenskeren],
 62             Mid: [Bjergsen],
 63             Adc: [Biofrost],
 64             Sup: [Yellowstar],
 65         },
 66         G2:{
 67             Top: [Expect],
 68             Jun: [Loulex],
 69             Mid: [Perkz],
 70             Adc: [Zven],
 71             Sup: [Mithy],
 72         },
 73     }
 74 }
 75 #print(LOL[‘LCK‘])
 76 
 77 while True:
 78     for LOL_list in LOL:
 79         print(LOL_list)
 80     LOL_choice_1 = input(Please enter the area you want to see:)
 81     #break
 82     if LOL_choice_1 in LOL:
 83         while True:
 84             for LOL_list_2 in LOL[LOL_choice_1]:
 85                 print(\t,LOL_list_2)
 86             LOL_choice_2 = input(Please enter the group you want to see:)
 87             if LOL_choice_2 in LOL[LOL_choice_1]:
 88                 while True:
 89                     for LOL_list_3 in LOL[LOL_choice_1][LOL_choice_2]:
 90                         print(\t, \t,LOL_list_3)
 91                     LOL_choice_3 = input(Please enter the location you want to see:)
 92                     if LOL_choice_3 in LOL[LOL_choice_1][LOL_choice_2]:
 93                         while True:
 94                             for LOL_list_4 in LOL[LOL_choice_1][LOL_choice_2][LOL_choice_3]:
 95                                 print(\t,\t,\t,LOL_list_4)
 96                             LOL_choice_4 = input(The last layer exits by b:)
 97                             if LOL_choice_4 == b:
 98                                 break
 99                     elif LOL_choice_3 == b:
100                         break
101                     else:
102                         print(Input error,Please re-enter)
103             elif LOL_choice_2 == b:
104                 break
105             else:
106                 print(Input error,Please re-enter)
107     elif LOL_choice_1 == b:
108         break
109     else:
110         print(Input error,Please re-enter)
View Code

 

Firs week-Homework(三级菜单)

标签:==   location   last   and   pow   lcs   bio   display   let   

原文地址:http://www.cnblogs.com/wazy/p/7747793.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!