Пример #1
0
def main():
    r.clear()
    print("****************************")
    print("JAM Hotel Reservation System")
    print("****************************")
    print("""    [1]: Reserve a room
    [2]: Check In
    [3]: Check Out
    [4]: Hotel Info
    [5]: Setup new Hotel
    [6]: Change Hotel
    [0]: Exit""")
    option = input("\n Please enter an option > ")
    if option == "1":
        pass
    elif option == "2":
        pass
    elif option == "3":
        pass
    elif option == "4":
        pass
    elif option == "5":
        pass
    elif option == "6":
        pass
    elif option == "0":
        raise SystemExit
    else:
        print("Please enter a valid option")
        input("Press enter to continue...")
        main()
Пример #2
0
def main():
    ref.clear()
    while exit == False:
        ref.clear()
        print("Inventory System: Welcome " + users[__user__])
        print(
            "\n[1]: Add Stock\n[2]: Check Stock\n[3]: Remove Stock\n[4]: Look Up Item\n[5]: Reserve Stock\n[0]: Exit"
        )
        option = input("Please select an Option: > ")
        if option == "1":
            addStock()
            input("Press enter to continue")
        elif option == "2":
            checkStock()
            input("Press enter to continue")
        elif option == "3":
            deleteStock()
            print("Removing Stock")
            input("Press enter to continue")
        elif option == "4":
            lookUp()
            input("Press enter to continue")
        elif option == "5":
            reserve()
            print("Reserving Stock")
            input("Press enter to continue")
        elif option == "0":
            raise SystemExit
        else:
            print("Please choose a valid option")
            continue
Пример #3
0
def startup():
    reference.clear()
    hotelName = input("Whats the name of you hotel? > ")
    hotelNums = input("How many rooms are in the Hotel? > ")
    hotelLocation = input("Where is the hotel? > ")
    setUpHotel(hotelName, hotelNums, hotelLocation)
    main()
Пример #4
0
def oyster():
    ref.clear()
    print("Oyster Menu\n")
    print("[1] Buy Oyster Card")
    print("[2] Top Up Oyster Card")
    print("[9] Exit")
    option = input("Choose an option: ")
    if option == "1":
        ref.clear()
        print("Oyster Menu\nBuying a card\n")
        cost = input("How much do you want to put on? £")
        print("Please place the card on the vailidator...")
        input()
        print("Done!")
        time.sleep(2)
        start()
    elif option == "2":
        print("Oyster Menu\Topping Up a card\n")
        cost = input("How much do you want to put on? £")
        print("Please place the card on the vailidator...")
        input()
        print("Done!")
        time.sleep(2)
        start()
    elif option == "9":
        start()
    else:
        print("Please enter a valid option")
        time.sleep(1)
        oyster()
Пример #5
0
def deleteStock():
    ref.clear()
    print("Please select a number to remove")
    for i in range(len(stock)):
        print("[" + str(i) + "]: " + stock[i].name)
    option = input("Select a number > ")
    try:
        del stock[int(option)]
    except IndexError:
        print("That ID is not in our database!!")
        input("Press enter to continue")
    except ValueError:
        print("Please input a number only")
        input("Press enter to continue")
Пример #6
0
def main():
    # Startup code
    ref.clear() # Clears the terminal
    print("Welcome to the JMC Hue Light Interaction Program!!")
    print("Please select an option:\n\n[1]: View states of all lights\n[2]: View the state of a specific light\n[3]: Change the light state\n[0]: Exit")
    option = input("\nPlease select an option > ")
    # Classic Option Selection If/Else
    if option == "1":
        viewState("all")
    elif option == "2":
        lightName = input("What is the name of the light you want to find? > ")
        viewState(lightName)
    elif option == "3":
        pass
    elif option == "0":
        raise SystemExit
    else:
        print("That is not a valid option, please select a different option")
        main()
Пример #7
0
def start():
    ref.clear()
    print("London Underground Tickets \n")
    print("[1] Buy Tickets")
    print("[2] Buy / Top up Oyster Card")
    print("[3] Options")
    print("[9] Exit")
    option = input("Choose an option: ")
    if option == "1":
        tickets()
    elif option == "2":
        oyster()
    elif option == "3":
        config(current_station, current_zone)
    elif option == "9":
        exit()
    else:
        print("Please enter a valid option")
        time.sleep(1)
        start()
Пример #8
0
def main():
    reference.clear()
    print("****************************")
    print("JAM Hotel Reservation System")
    print("****************************")
    print("Hotel: {}\n".format(hotels[active].name))
    print("""    [1]: Reserve a room
    [2]: Check In
    [3]: Check Out
    [4]: Hotel Info
    [5]: Setup new Hotel
    [6]: Change Hotel
    [0]: Exit""")
    option = input("\n Please enter an option > ")
    if option == "1":
        reserve()
        main()
    elif option == "2":
        for i in range(len(reservations)):
            print(reservations[i].roomNum)
            print(reservations[i].reserveeName)
            print(reservations[i].roomTeir)
            print(reservations[i].floor)
        main()
    elif option == "3":
        pass
    elif option == "4":
        pass
    elif option == "5":
        pass
    elif option == "6":
        pass
    elif option == "0":
        raise SystemExit
    else:
        print("Please enter a valid option")
        input("Press enter to continue...")
        main()
Пример #9
0
def config(current_station, current_zone):
    ref.clear()
    print("Configuration\n")
    print("You are currently at " + current_station + " Station in Zone " +
          current_zone)
    print("\n[1] Change Station")
    print("[2] Change Zone")
    print("[9] Exit")
    option = input("Please Choose an option: ")
    if option == "1":
        print("")
        current_station = input("What Station Would You Like to change to? ")
        config(current_station, current_zone)
    elif option == "2":
        print("")
        current_zone = input("What Zone Would You Like to change to? ")
        config(current_station, current_zone)
    elif option == "9":
        start()
    else:
        print("Please enter a valid Option")
        time.sleep(2)
        config()
Пример #10
0
def main():
    reference.clear()
    print('''
McCarthy Meal Planner - 
[1] - Start Meal Plan
[2] - See Index
[3] - Search Recipes 
[0] - Exit
          ''')
    option = input("What option do you want to do? > ")
    if option == "1":
        print("Starting Meal Plan")
        time.sleep(2)

        main()
    elif option == "2":
        for i in range(len(meals)):
            print(meals[i][0])
        main()
    elif option == "3":
        print("Searching Recipes")
        main()
    elif option == "0":
        exit()
Пример #11
0
def tickets():
    ref.clear()
    print("Ticket Menu\n")
    print("[1] Tube Tickets")
    print("[2] National Rail Tickets")
    print("[9] Exit")
    option = input("Choose an option: ")
    if option == "1":
        ref.clear()
        print("Tube Ticket Menu\n")
        print("[1] One Way Tickets")
        print("[2] Return Tickets")
        print("[3] Travel Cards")
        print("[9] Exit")
        option = input("Choose an option: ")
        if option == "1":
            printTickets("1", True)
        elif option == "2":
            printTickets("2", True)
        elif option == "3":
            travelcard()
        elif option == "9":
            tickets()
    elif option == "2":
        ref.clear()
        print("Train Ticket Menu\n")
        print("[1] One Way Tickets")
        print("[2] Return Tickets")
        print("[3] Exit")
        option = input("Choose an option: ")
        if option == "1":
            printTickets("1", False)
        elif option == "2":
            printTickets("2", False)
        else:
            print("Please input a valid option")
            time.sleep(1)
            tickets()
    elif option == "9":
        start()
    else:
        print("Please input a valid option")
        time.sleep(1)
        tickets()
Пример #12
0
def checkStock():
    ref.clear()
    print("Stock:\n")
    for i in range(len(stock)):
        print(stock[i].name)
Пример #13
0
def addStock():
    ref.clear()
    nameToAdd = input("What is the name of the item? > ")
    locationOfItem = input("Where is this item? > ")
    temp = item(nameToAdd, locationOfItem, len(stock))
    stock.append(temp)
Пример #14
0
            "\n[1]: Add Stock\n[2]: Check Stock\n[3]: Remove Stock\n[4]: Look Up Item\n[5]: Reserve Stock\n[0]: Exit"
        )
        option = input("Please select an Option: > ")
        if option == "1":
            addStock()
            input("Press enter to continue")
        elif option == "2":
            checkStock()
            input("Press enter to continue")
        elif option == "3":
            deleteStock()
            print("Removing Stock")
            input("Press enter to continue")
        elif option == "4":
            lookUp()
            input("Press enter to continue")
        elif option == "5":
            reserve()
            print("Reserving Stock")
            input("Press enter to continue")
        elif option == "0":
            raise SystemExit
        else:
            print("Please choose a valid option")
            continue


if __name__ == "__main__":
    ref.clear()
    __user__ = login()
    main()
Пример #15
0
def travelcard():
    ref.clear()
    print("Ticket Options\n")
    Exit = False
    while Exit == False:
        try:
            Exit = True
            startZone = int(input("From Zone: "))
        except TypeError:
            print("Please input a correct value!")
            Exit = False
    Exit = False
    while Exit == False:
        try:
            Exit = True
            endZone = int(input("To Zone: "))
        except TypeError:
            print("Please input a correct value!")
            Exit = False
    if startZone == endZone and isinstance(startZone, int) and isinstance(
            endZone, int):
        Zones = "Zone " + str(startZone) + " Only"
    elif startZone > endZone:
        Zones = "Zone " + str(endZone) + "-" + str(startZone)
    elif startZone < endZone:
        Zones = "Zone " + str(startZone) + "-" + str(endZone)
    else:
        print("Please enter correct zones")
        travelcard()
    Exit = False
    while Exit == False:
        print("Ticket Types:")
        print("[1] Adult (16+)")
        print("[2] Child (Under 16)")
        print("[3] Apprentice")
        print("[4] Student (Requires Verification)")
        print("[9] Exit")
        option = input(" >")
        if option == "1":
            ticketType = "Adult"
            Exit = True
        elif option == "2":
            ticketType = "Child"
            Exit = True
        elif option == "3":
            ticketType = "Apprentice"
            Exit = True
        elif option == "4":
            ticketType = "Student"
            Exit = True
        elif option == "9":
            tickets()
        else:
            print("Please enter a valid option")
            ref.clear()
    print("")
    print("---------------------------------------")
    print("Travelcard")
    print(Zones)
    print("Issued at: " + current_station)
    print("Type: " + ticketType)
    print("Valid on " + str(datetime.date.today()))
    print("")
    print("")
    print("---------------------------------------")
    while True:
        option = input("Is this OK? Y/N: ")
        if option == "y" or "Y":
            break
        elif option == "n" or "N":
            travelcard()
        else:
            print("Please Enter a correct option")
    print("Printing...")
    time.sleep(1)
    ref.clear()
    print("---------------------------------------")
    print("Travelcard")
    print(Zones)
    print("Type: " + ticketType)
    print("Valid on " + str(datetime.date.today()))
    print("")
    print("")
    print("---------------------------------------")
    input("Press enter to continue")
    start()
Пример #16
0
def printTickets(typeOfTicket, tube):
    ref.clear()
    print("Ticket Options\n")
    destination = input("Destination: ")
    if tube:
        mode = "London Underground"
        zone_line = input("Destination Zone: ")
        zone_line = "Zone " + zone_line
    else:
        mode = "National Rail"
        zone_line = input("Line: ")
        zone_line = "Via " + zone_line

    Exit = False
    while Exit == False:
        print("Ticket Types:")
        print("[1] Adult (16+)")
        print("[2] Child (Under 16)")
        print("[3] Apprentice")
        print("[4] Student (Requires Verification)")
        print("[9] Exit")
        option = input(" >")
        if option == "1":
            ticketType = "Adult"
            Exit = True
        elif option == "2":
            ticketType = "Child"
            Exit = True
        elif option == "3":
            ticketType = "Apprentice"
            Exit = True
        elif option == "4":
            ticketType = "Student"
            Exit = True
        elif option == "9":
            tickets()
        else:
            print("Please enter a valid option")
            ref.clear()
    if typeOfTicket == "1":
        returnoneWay = "One Way"
    elif typeOfTicket == "2":
        returnoneWay = "Return"

    print("---------------------------------------")
    print(mode)
    print(returnoneWay)
    print("Destination Station: " + destination)
    print("From: " + current_station)
    print(zone_line)
    print("Type: " + ticketType)
    print("Valid on " + str(datetime.date.today()))
    print("---------------------------------------")
    option = input("Is this ok? Y/N: ")
    if option == "y" or "Y":
        print("Printing...")
        time.sleep(1)
        ref.clear()
        print("---------------------------------------")
        print(mode)
        print(returnoneWay)
        print("Destination Station: " + destination)
        print(zone_line)
        print("Type: " + ticketType)
        print("Valid on " + str(datetime.date.today()))
        print("---------------------------------------")
        input("Press enter to continue")
        start()