Page 2 of 2
npv
Posted: Thu Aug 21, 2025 9:09 am
by admin
Code: Select all
def npv(cash_flows, rate):
"""Calculate Net Present Value of given cash flows."""
return round(sum(cf / ((1+rate/100)**i) for i, cf in enumerate(cash_flows, start=1)), 2)
# Example usage
print("NPV:", npv([20000, 30000, 50000], 10))
caro_applicable
Posted: Thu Aug 21, 2025 9:10 am
by admin
Code: Select all
def caro_applicable(company_type, turnover, borrowings):
"""Check CARO applicability (simplified for Pvt Ltd)."""
if company_type.lower() == "pvt ltd" and turnover < 100000000 and borrowings < 10000000:
return "CARO Not Applicable ✅"
else:
return "CARO Applicable ❌"
# Example usage
print(caro_applicable("Pvt Ltd", 21000000, 500000))
roc_delay_fee
Posted: Thu Aug 21, 2025 9:11 am
by admin
Code: Select all
def roc_delay_fee(days, base_fee=500):
"""ROC late filing penalty (simplified flat rate)."""
return base_fee + (days * 100)
# Example usage
print("ROC Fee:", roc_delay_fee(12))
days_between
Posted: Thu Aug 21, 2025 9:11 am
by admin
Code: Select all
def days_between(date1, date2):
"""Find days between two dates."""
from datetime import datetime
d1 = datetime.strptime(date1, "%d-%m-%Y")
d2 = datetime.strptime(date2, "%d-%m-%Y")
return abs((d2 - d1).days)
# Example usage
print("Days Late:", days_between("15-08-2025", "25-08-2025"))