Programming Examples

Python program to input total debt and total assets and calculate total debt to total assets ratio and check whether major funded by assets or equity


Write a program to input total debt and total assets and calculate total-debt-to-total-assets ratio (TD/TA) as Total Debt/Total Assets. Then print if the major portion of the debt is funded by assets (when TD/TA > 1) or greater portion of assets is funded by equity (when TD/TA < 1).

Solution

total_debt  = float(input("Enter total debt  : "))
total_assets  = float(input("Enter total assets  : "))
ratio = total_debt / total_assets
if ratio > 1 :
    print("the major portion of the debt is funded by assets ")
else :
    print("greater portion of assets is funded by equity ")
Output

Enter total debt  : 4000

Enter total assets  : 2000

the major portion of the debt is funded by assets 

>>> 

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

Enter total debt  : 5000

Enter total assets  : 12000

greater portion of assets is funded by equity 

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 Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz