Submitted by:- Meghansh Goel (meghansh.work@gmail.com)
This program calculates the number of points left with each payer after spending X number of points (X provided by the user). This program is a part of the fetch backend take home assessment.
Python version ^3.7
In the command line terminal, enter the following
python3 main.py X
Provide the value of X which is an integer For example:
python3 main.py 5000
The program outputs a dictionary with the names of the payers and the number of points that each of them are left with after spending X points.
There are 2 error states in the program:
- If X < 0, then the program outputs "ERROR! Points to spend cannot be less than 0" and exits.
- The program expects "transactions.csv" file to be present in the current working directory of the program. If it is not present, the program outputs "ERROR! Points to spend cannot be less than 0"