Example #1
0
def checkFlights(first_name, last_name):
    komanda = raw_input("Unesite zeljenu operaciju: ")
    komanda = komanda.upper()
    if (komanda.upper() in ('1', '2', '3', '4', '5', '6', '7', 'X')):
        if komanda == '1':
            flights.sortStart()
            checkFlights(first_name, last_name)
        elif komanda == '2':
            flights.sortDestination()
            checkFlights(first_name, last_name)
        elif komanda == '3':
            flights.sortStartDate()
            checkFlights(first_name, last_name)
        elif komanda == '4':
            flights.sortDestinationDate()
            checkFlights(first_name, last_name)
        elif komanda == '5':
            flights.sortTimeLift()
            checkFlights(first_name, last_name)
        elif komanda == '6':
            flights.sortTimeLanding()
            checkFlights(first_name, last_name)
        elif komanda == '7':
            flights.sortCarrier()
            checkFlights(first_name, last_name)
        elif komanda == "X":
            menu.printMenu()
            getCommand(first_name, last_name)
    else:
        print "\nNiste uneli odgovarajuci komandu\n"
        checkFlights(first_name, last_name)
Example #2
0
def main(cont):
    while cont == "Y":
        try:
            choice = menu.printMenu()
            fn = switcher.get(choice, "Invalid Choice")
            fn()
            cont = input("Do you wish to continue? [Y]/n ").capitalize()
        except Exception as err:
            menu.printError(err)
Example #3
0
    print("\t\t실행 가능한 동작 목록")
    print(
        """
    \t\t\t1. 더하기
    \t\t\t2. 빼기
    \t\t\t3. 곱하기
    \t\t\t4. 나누기
    \t\t\t5. 몫 구하기
    \t\t\t6. 나머지 구하기
    \t\t\t7. 제곱 구하기
    \t\t\t6. 종료
    """
    )

else:
    menu.printMenu()
    menunumber = menu.getMenuNumber()

    while menunumber != "8":
        operand = getOperand()

        while menunumber == "4" and operand[1] == 0:
            print("0으로 나눌 수 없습니다. 다시입력해주세요")
            operand = getOperand()

        printResult(operand[0], operand[1])
        time.sleep(3)

        menu.printMenu()
        menunumber = menu.getMenuNumber()
Example #4
0
def printPoetry(menuNumber, title, name):
    while menuNumber != "5":
        if menuNumber == "1":
            os.system("cls")
            print("\n" * 30)

            print("\t\t", title[0])
            time.sleep(1)

            print("\n\t\t\t\t", name, "\n")
            time.sleep(1)

            i = 0
            for i in range(0, len(lyrics1) - 1):
                print("\t", lyrics1[i])
                time.sleep(1)

        elif menuNumber == "2":
            os.system("cls")
            print("\n" * 30)

            print("\t\t", title[1])
            time.sleep(1)

            print("\n\t\t\t\t", name, "\n")
            time.sleep(1)

            i = 0
            for i in range(0, len(lyrics2) - 1):
                print("\t", lyrics2[i])
                time.sleep(1)

        elif menuNumber == "3":
            os.system("cls")
            print("\n" * 30)

            print("\t\t", title[2])
            time.sleep(1)

            print("\n\t\t\t\t", name, "\n")
            time.sleep(1)

            i = 0
            for i in range(0, len(lyrics3) - 1):
                print("\t", lyrics3[i])
                time.sleep(1)

        elif menuNumber == "4":
            os.system("cls")
            print("\n" * 30)

            print("\t\t", title[3])
            time.sleep(1)

            print("\n\t\t\t\t", name, "\n")
            time.sleep(1)

            i = 0
            for i in range(0, len(lyrics4) - 1):
                print("\t", lyrics4[i])
                time.sleep(1)

        time.sleep(4)
        os.system("cls")
        menu.printMenu(programtitle, name, content.split("\n"))
        menuNumber = menu.getMenuNumber()

    os.system("cls")
    print("\n\n\n")
    print("\t\t프로그램을 종료합니다.")
    print("\t\t이용해 주셔서 감사합니다.")
    print("\n\n\n")
Example #5
0
            i = 0
            for i in range(0, len(lyrics4) - 1):
                print("\t", lyrics4[i])
                time.sleep(1)

        time.sleep(4)
        os.system("cls")
        menu.printMenu(programtitle, name, content.split("\n"))
        menuNumber = menu.getMenuNumber()

    os.system("cls")
    print("\n\n\n")
    print("\t\t프로그램을 종료합니다.")
    print("\t\t이용해 주셔서 감사합니다.")
    print("\n\n\n")


##
##
##
programtitle = "시 출력 프로그램"
name = "김소월"
content = """진 달 래  꽃
초        혼
엄마야누나야
개   여   울"""

menu.printMenu(programtitle, name, content.split("\n"))
menuNumber = menu.getMenuNumber()
printPoetry(menuNumber, title, name)
Example #6
0
    
    산산히 부서진 이름이여~
    부르다가 내가죽을 이름이여"""

    printPoetry(title, poet, contents.split("\n"))


def printUmMaYa():
    title = "엄마야 누나야"
    poet = "김소월"
    contents = """엄마야 누나야 강변 살자
    들에는 금모래 빛
    
    엄마야 누나야 강변 살자
    들에는 금모래 빛
    
    엄마야 누나야 강변 살자
    들에는 금모래 빛"""

    printPoetry(title, poet, contents.split("\n"))


title = "김소월 시선"
contents = ["진달래 꽃", "초   혼", "엄마야 누나야"]
myFunc = [printJinDalRae, printChoHon, printUmMaYa]
printMenu(title, contents)
MenuNumber = getMenuNumber(contents)
while MenuNumber != str(len(contents) + 1):
    myFunc[int(MenuNumber) - 1]
    printMenu(title, contents)
    MenuNumber = getMenuNumber(contents)
Example #7
0
def main():
    name_user, last_name_user = menu.login()
    menu.printMenu()
    getCommand(name_user, last_name_user)
Example #8
0
def getCommand(name_user, last_name_user):
    komanda = raw_input("Unesite zeljenu operaciju: ")
    komanda = komanda.upper()
    if (komanda in ('1', '2', '3', '4', '5', 'X')):
        if komanda == '1':
            flights.printFlights()
            checkFlights(name_user, last_name_user)
        elif komanda == '2':
            if menu.tip_korisnika == 0:
                tickets.addTickets(name_user, last_name_user)
                menu.printMenu()
                getCommand(name_user, last_name_user)
            else:
                print "Nemate pristup ovoj funkciji"
                menu.printMenu()
                getCommand(name_user, last_name_user)
        elif komanda == '3':
            if menu.tip_korisnika == 0:
                tickets.ticketChanging()
                menu.printMenu()
                getCommand(name_user, last_name_user)
            else:
                print "Nemate pristup ovoj funkciji"
                menu.printMenu()
                getCommand(name_user, last_name_user)
        elif komanda == '4':
            if menu.tip_korisnika == 0:
                tickets.deleteTicket()
                menu.printMenu()
                getCommand(name_user, last_name_user)
            else:
                print "Nemate pristup ovoj funkciji"
                menu.printMenu()
                getCommand(name_user, last_name_user)
        elif komanda == '5':
            if menu.tip_korisnika == 1:
                menadzer.izvestaji()
                menu.printMenu()
                getCommand(name_user, last_name_user)
            else:
                print "Nemate pristup ovoj funkciji"
                menu.printMenu()
                getCommand(name_user, last_name_user)
        elif komanda == "X":
            print "Prijatan ostatak dana."
            quit()
    else:
        print "\nNiste uneli odgovarajuci komandu\n"
        getCommand(name_user, last_name_user)
        flights.printFlights()
        checkFlights(name_user, last_name_user)