online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
inv = {'rope': 1, '劍': 1, 'gold coin': 42, 'dagger': 1, 'arrow': 1} # 倉庫 dragonLoot = ['超級劍', 'gold coin', 'arrow'] def addInventory(inventory, addItems): inv_dict = {} inv_dict.update(inventory) for item in addItems: if item in inv_dict: inv_dict[item] += 1 else: inv_dict[item] = 1 return inv_dict def diplayInventory(inventory): print("Inventory:") for k, v in inventory.items(): print(f"{v} {k}") print("items number:", len(inventory), "\n") diplayInventory(inv) new_inv = addInventory(inv, dragonLoot) diplayInventory(inv) diplayInventory(new_inv)

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue