Income, Expenditure and Savings Tracker
M · mediumP · Verified PYQ
Problem
Write a program that continuously takes user input: - Income (amount earned) - Type of Material (category of expenditure) - Expenditure on that Material (amount spent) The input continues until the user enters “done”. Then display: 1. Total income 2. Total savings (Income - Total Expenditure) 3. List of where money was spent with respective amounts
Example
Input
5000 Food 1200 Rent 2000 done
Output
Total Income: 5000 Total Savings: 1800 Food: 1200 Rent: 2000
Use a dictionary to track expenditure categories. Sum all expenditures for savings calculation.