Skip to content

Commit 31402db

Browse files
committed
book-store: use book price const in calculation
1 parent fb58ad3 commit 31402db

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)