Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # MODULES
- import os
- # FUNCTIONS
- def clear():
- os.system('cls')
- def skip():
- input("<Press Enter To Continue>")
- def Create_Inventory():
- clear()
- inventory_dictionary = {}
- count_inventory = int(input("Enter the number of Inventories: "))
- for num_inv in range(count_inventory):
- add_inventory = str(input("Enter Inventory #%d: " % (num_inv + 1)))
- inventory_dictionary[add_inventory] = set()
- for find_key in inventory_dictionary:
- count_item = int(input("\nHow many items in %s inventory: " % find_key))
- for num_item in range(count_item):
- #add_item = input("Enter item #%d: " % (num_item + 1))
- #inventory_dictionary[find_key].add(add_item)
- add_item = set(input("Enter item #%d: " % (num_item + 1)))
- inventory_dictionary[find_key].update(add_item)
- return inventory_dictionary
- def Create_Stock():
- Stock_Dictionary = Create_Inventory()
- for find_key in Stock_Dictionary.keys():
- print(find_key)
- #print(list(list(Stock_Dictionary.values())[2])[list(Stock_Dictionary.keys()).index(find_key)])
- for a in range(len(find_key)):
- print(Stock_Dictionary[find_key])
- # COMMENCE PROGRAM
- def main():
- x = 0
- while x < 1:
- start = input("Are you ready to Start? (Y/N):")
- if start == 'y' or start == 'Y':
- #whole_dict = Create_Inventory()
- #print(whole_dict)
- Create_Stock()
- skip()
- break
- elif start == 'n' or start == 'N':
- break
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement