Given the issue and return dates of a book, calculate the due date, days late and the fine with tiered rates.
Skills: Python / Java, dates, conditions
Based on fine rules used by many public and college libraries
A library issues books for 14 days. After that a fine is charged per day: ₹2 per day for the first 7 late days, ₹5 per day for the next 23 days, and after 30 late days the member pays a flat ₹250 and the membership is flagged.
The librarian calculates this by hand with a calendar. Automate it.
Create a free student account to submit your work, get mentor feedback and unlock the reference solution.