Write a program to input assets, liabilities and capital of a company and test if accounting equation holds true for the given value (i.e., balanced or not).

Hint : assets == liabilities + capital 


"> PYTHON PROGRAM TO INPUT ASSETS LIABILITIES AND CAPITAL THEN CHECK ACCOUNTING EQUATION MEANS BALANCED OR NOT

Programming Example

Write a program to input assets, liabilities and capital of a company and test if accounting equation holds true for the given value (i.e., balanced or not).

Hint : assets == liabilities + capital 


Solution

capital = float(input("Enter capital : ")) 
assets = float(input("Enter assets  : "))
liabilities = float(input("Enter liabilities : "))
if assets == liabilities + capital :
    print("Balanced")
else :
    print("Not balanced")
Output

Enter capital : 5000

Enter assets  : 15000

Enter liabilities : 20000

Not balanced

>>> 

======================== 

Enter capital : 5000

Enter assets  : 20000

Enter liabilities : 15000

Balanced

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Website development Company in Allahabad