Open dbarashev-jetbrains opened 2 months ago
Hey @DanLyss the pull request is supposed to pass a code review:
A task is considered as completed if a pull request with the working task code and passing unit tests is submitted before the submission deadline, and the code review ends with "LGTM" (approval) from one of the teachers.
I will do the review post-factum, however, the next time please assign me as a reviewer before you merge the pull request,.
@DanLyss Also please don't close the issue because it is shared between the projects.
Suppose that we have a subset of the event participants who split an expense. To store this record persistently we want to be able to encode the participant ids, the expense amount and information on who paid the expense in a string, like this:
where is a comma-delimited list of participant usernames, and the paying participant is the first one in this list. An example of such record, that says that participants
john,paul,mick
are going to split the expense of 25USD, paid byjohn
:Your task is to design a simple data structure
ExpenseItem
, built from tuples, lists and atomic types for storing this information and to write two functions:Please don't forget to write unit tests for these functions.