Skip to content

Commit 926ddeb

Browse files
book-store: Use book price constant in calculation
2 parents b410346 + 31402db commit 926ddeb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

exercises/book-store/example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def _group_price(size):
55
discounts = [0, .05, .1, .2, .25]
66
if not (0 < size <= 5):
77
raise ValueError('size must be in 1..' + len(discounts))
8-
return 8 * size * (1 - discounts[size - 1])
8+
return BOOK_PRICE * size * (1 - discounts[size - 1])
99

1010

1111
def calculate_total(books, price_so_far=0.):

0 commit comments

Comments
 (0)