Programming Examples
Python program to create a dictionary has three keys assets liabilities and capital
A dictionary has three keys: 'assets', 'liabilities' and 'capital'. Each of these keys store their value in form of a list storing various values of 'assets', liabilities' and 'capital' respectively. Write a program to create a dictionary in this form and print. Also test if the accounting equation holds true.
Output/ Explanation:
Enter assets list : [3000,5000,2000]
Enter liability list : [4000,1500,2000]
Enter capital list : [500,2000]
Result Dictionary is : {'assets': [3000, 5000, 2000], 'liability ': [4000, 1500, 2000], 'capital': [500, 2000]}
Balanced
------------------------------------------------------------------------------------------
Enter assets list : [3000,4000,4000]
Enter liability list : [5000,9000]
Enter capital list : [3000,5000]
Result Dictionary is : {'assets': [3000, 4000, 4000], 'liability': [5000, 9000], 'capital': [3000, 5000]}
Not Balanced