Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elven9/kata-potter-tdd
Kata Potter TDD Practice
https://github.com/elven9/kata-potter-tdd
Last synced: 24 days ago
JSON representation
Kata Potter TDD Practice
- Host: GitHub
- URL: https://github.com/elven9/kata-potter-tdd
- Owner: Elven9
- Created: 2022-05-12T07:27:05.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-05-14T12:10:18.000Z (almost 3 years ago)
- Last Synced: 2024-11-21T14:47:04.955Z (3 months ago)
- Language: Go
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Kata Potter
Potter mania is sweeping the country and parents of teenagers everywhere are queueing
up with shopping baskets overflowing with Potter books. Your mission is to write
a piece of code to calculate the price of any conceivable shopping basket, giving
as big a discount as possible.## Requirement Spec
- One copy of any of the five books costs 8 EUR
- 5% Discount -> Buy 2 different books
- 10% Discount -> Buy 3 different books
- 20% Discount -> Buy 4 different books
- 25% Discount -> Buy 5 different books## Edge Cases
- Buy 4 books, 3 with different titles -> 3 book with 10% discount, 1 book with
8 EUR