Advertisement
rangga_hrdme

KINDS OF FUNCTION 3

Apr 26th, 2021
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.05 KB | None | 0 0
  1. def StraightLine(Asset, Start, End, Estimation):
  2.     if Asset > 0 and Start > 0 and End > 0:
  3.         depreciation = float((Asset - Estimation) / End)
  4.         print("\n", " Depreciation/ Year : ", int(depreciation))
  5.         print("\n |Year|   Amount   - Accummulation =   Resid   | \n")
  6.     else:
  7.         print(" Minimal Integer: 1")
  8.  
  9.  
  10.     accummulation = float(Start/End) * (Asset - Estimation)
  11.     Resid = Asset - accummulation
  12.     message = ' %d   %.2f - %.2f = %.2f' % (Start, Asset, accummulation, Resid)
  13.     print(message)
  14.     return Resid
  15.  
  16. print("Depreciation : Straight Line Method")
  17. Asset       = float(input("Cost of Bought: "))
  18. print("Period of Depreciation(Year): ")
  19. Start       = int(input("Begin of Year (Integer): "))
  20. End         = int(input("End of Year (Integer): "))
  21. Estimation  = float(input("Residual value(Float): "))
  22.  
  23. StraightLine(Asset, Start, End, Estimation)
  24.  
  25. # Depreciation: Straight Line
  26. # METHOD (FUNCTION HAS RETURN)
  27. # Pray 4 Uyghur: https://bylinetimes.com/2020/08/24/death-is-everywhere-millions-more-uyghurs-missing/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement