Skip to content

furkhat/shared-bills-splitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Motivation

So I was on a trip with my friends. And we had buch of shared bills, like when we go for a meal or fuel the car. And one person would pay for everyone because it is faster and more convinient then spliting the bill right away. At the end we would calculate compensations for people who paid. It was cumbersome work. And I thought, hey it would be great to have a program that does this. So I wrote that program

Example

> python3 main.py
Dina 1687 Adilet Furkhat Ainura Nikita
Dina 975 Adilet Furkhat Ainura Nikita
Adilet 767 Dina Furkhat Ainura Nikita
Adilet 1554 Dina Furkhat Ainura Nikita
Dina 406 Adilet Furkhat Ainura Nikita
Dina 1700 Adilet Furkhat Ainura Nikita
Adilet 1050 Dina Furkhat Ainura Nikita
Adilet 1200 Furkhat Nikita
Furkhat 9000 Adilet Dina Ainura Nikita


Report:

Adilet owes 279.4 to Dina
Adilet owes 725.8 to Furkhat
Adilet owes 1005.1999999999999 in total.

Ainura owes 953.6 to Dina
Ainura owes 1800.0 to Furkhat
Ainura owes 674.2 to Adilet
Ainura owes 3427.8 in total.

Dina owes 846.4 to Furkhat
Dina owes 846.4 in total.

Furkhat has no debts.

Nikita owes 953.6 to Dina
Nikita owes 1800.0 to Furkhat
Nikita owes 1074.2 to Adilet
Nikita owes 3827.8 in total.

Tests

python3 -m unittest

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages