Created
August 8, 2016 19:42
-
-
Save Gwith/81175616e2be9f4a4a1359c2f014dfbd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stuff = {'rope': 1, 'torch': 6, 'gold coin': 42, 'dagger': 1, 'arrow': 12} | |
def displayInventory(inventory): | |
print("Inventory:") | |
item_total = 0 | |
for k, v in inventory.items(): | |
print(v, k) | |
print("Total number of items: " + str(item_total)) | |
displayInventory(stuff) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment