The machine coding task was an expense sharing app: add expenses, split equally or by percentage, and show who owes whom. I wrote the requirements as…