Q. 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.



Answer = 


assets = eval(input("Enter assets list :-"))
liabilitie = eval(input("Enter liabilitie list :-"))
capital = eval(input("Enter capital list :-"))
 
dic = { "assets" : assets , "liabilitie" : liabilitie , "capital" : capital }

for i in range( len( dic[ "assets" ] ) ) :
    
    print("for item number ",i)
    if  dic [ "assets" ][ i ] == dic [ "liabilitie"][ i ] + dic [ "capital" ][ i ] :
        print("Balanced")
    else:
        print("Not Balanced")


Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post