salary_slip(ctc) for a simplified Indian structure: basic = 40% of CTC, HRA = 50% of basic, PF deduction = 12% of basic, professional tax = 2400 flat/year; special allowance fills whatever remains of CTC. Return a dict of all five components (annual, 2-decimal rounded) plus take_home = ctc − pf − prof_tax.salary_slip(1000000)
{'basic': 400000.0, 'hra': 200000.0, 'special': 400000.0, 'pf': 48000.0, 'prof_tax': 2400, 'take_home': 949600.0}Components derived in the stated order.
Derive basic first — everything hangs off it.
Deductions subtract from CTC, not from basic.