python-Implementation of Level 3 menu (homework lesson)

Source: Internet
Author: User
Tags prev

1 #Task:2 #Show Level 3 menu3 #Level 1 Menu # shows 3 cities + 1 Beijing 2 Shanghai 3 Guangzhou4 #Level 2 Menu #显示 Select 1 Beijing = B1 B2 B35 #Level 2 Menu #显示 select 2 Shanghai = S1 S2 S36 #Level 2 Menu #显示 Select 3 Guangzhou = G1 G2 G37 8 #Level 3 Menu #显示 Choose B1 = b1_1 b1_2 b1_39 #Level 3 Menu #显示 Choose B2 = B2_1 b2_2 b2_3Ten #Level 3 Menu #显示 Choose B3 = B3_1 b3_2 b3_3 One  A #Level 3 Menu #显示 Choose S1 = s1_1 s1_2 s1_3 - #Level 3 Menu #显示 Choose S2 = S2_1 s2_2 s2_3 - #Level 3 Menu #显示 Choose S3 = S3_1 s3_2 s3_3 the  - #Level 3 Menu #显示 Choose G1 = g1_1 g1_2 g1_3 - #Level 3 Menu #显示 Choose G2 = G2_1 g2_2 g2_3 - #Level 3 Menu #显示 Choose G3 = G3_1 g3_2 g3_3 +  - #Select the Q key to exit the program and select the R key to return to the previous level menu +  Acurpage = 0;#Current Page atminPage = 0;#Minimum pages -MaxPage = 3;#Max pages -Showval ="1. BEIJING 2. Shanghai 3. Guangzhou R. prev Q. Exit" -Selectval ="Beijing" -  -  whileTrue: in     Print("-----------------------------------") -     Print("|"+showval+"|")#Show specific content to     Print("-----------------------------------") +Userval = input ("input your Select:")#user-entered values -  the     ifUserval = ="Q" orUserval = ="Q": *          Break $      Panax Notoginseng     ifUserval = ="1": -         ifCurpage = =0: theSelectval ="Beijing" +Showval ="1.b1 2.b2 3.b3 R. prev Q. Exit" ACurpage + = 1; the         elifCurpage = = 1: +             ifSelectval = ="Beijing": -Showval ="b1_1 b1_2 b1_3" $             elifSelectval = ="Shanghai": $Showval ="s1_1 s1_2 s1_3" -             elifSelectval = ="Guangzhou": -Showval ="g1_1 g1_2 g1_3" theCurpage + = 1; -     elifUserval = ="2":Wuyi         ifCurpage = =0: theSelectval ="Shanghai" -Showval ="1.s1 2.s2 3.s3 R. prev Q. Exit" WuCurpage + = 1; -         elifCurpage = = 1: About             ifSelectval = ="Beijing": $Showval ="b2_1 b2_2 b2_3" -             elifSelectval = ="Shanghai": -Showval ="s2_1 s2_2 s2_3" -             elifSelectval = ="Guangzhou": AShowval ="g2_1 g2_2 g2_3" +Curpage + = 1; the     elifUserval = ="3": -         ifCurpage = =0: $Selectval ="Guangzhou" theShowval ="1.g1 2.g2 3.g3 R. prev Q. Exit" theCurpage + = 1; the         elifCurpage = = 1: the             ifSelectval = ="Beijing": -Showval ="b3_1 b3_2 b3_3" in             elifSelectval = ="Shanghai": theShowval ="s3_1 s3_2 s3_3" the             elifSelectval = ="Guangzhou": AboutShowval ="g3_1 g3_2 g3_3" theCurpage + = 1; the     elifUserval = ="R" orUserval = ="R": the         ifCurpage <= 1: +Showval ="1. BEIJING 2. Shanghai 3. Guangzhou R. prev Q. Exit" -Curpage =0 the         Else:Bayi             ifSelectval = ="Beijing": theShowval ="1.b1 2.b2 3.b3" theCurpage-= 1; -             elifSelectval = ="Shanghai": -Showval ="1.s1 2.s2 3.s3" theCurpage-= 1; the             elifSelectval = ="Guangzhou": theShowval ="1.g1 2.g2 3.g3" theCurpage-= 1;  -     Else: the         Print("not found the corresponding city, please re-enter <-") the Print("GAME over")

python-Implementation of Level 3 menu (homework lesson)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.