Exemple #1
0
        choice = int(input())
        if choice == 1:
            qty = int(
                input("How much would you like to add to the inventory?"))
            book1.add_inventory(qty)
            print("The quantity in the inventory is now" + ' ' +
                  str(book1.quantity) + "\n\n")
        else:
            print("The quantity in book 2 is now" + ' ' + str(book2.quantity) +
                  "\n\n")
    elif menu_choice == 2:
        print("Book 1 or 2?")
        choice = int(input())
        if choice == 1:
            qty = int(input("How many would you like to remove?"))
            result = book1.deducting_inventory(qty)
        elif choice == 2:
            qty = int(input("How many would you like to remove?"))
            result = book2.deducting_inventory(qty)
            if result == 0:
                print("The quantity is now 1" + ' ' + str(book1.quantity) +
                      "\n\n")
            else:
                print("You do not have enough to remove from inventory!")

    elif menu_choice == 3:
        print("Book 1 or 2?")
        choice = int(input())
        if choice == 1:
            price = float(input("What would you like the new price to be?"))
            book1.price = price