You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sync updated the docs and the tests.toml file.
Regenerating the test suite added several new tests.
One of the tests had a failure due to a rounding difference:
Expected: 145.6
Actual: 145.60000000000002
I changed the test suite to use assert_in_delta instead.
Copy file name to clipboardExpand all lines: exercises/practice/book-store/.docs/instructions.md
+8-15Lines changed: 8 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,20 @@
1
1
# Instructions
2
2
3
-
To try and encourage more sales of different books from a popular 5 book
4
-
series, a bookshop has decided to offer discounts on multiple book purchases.
3
+
To try and encourage more sales of different books from a popular 5 book series, a bookshop has decided to offer discounts on multiple book purchases.
5
4
6
5
One copy of any of the five books costs $8.
7
6
8
-
If, however, you buy two different books, you get a 5%
9
-
discount on those two books.
7
+
If, however, you buy two different books, you get a 5% discount on those two books.
10
8
11
9
If you buy 3 different books, you get a 10% discount.
12
10
13
11
If you buy 4 different books, you get a 20% discount.
14
12
15
13
If you buy all 5, you get a 25% discount.
16
14
17
-
Note: that if you buy four books, of which 3 are
18
-
different titles, you get a 10% discount on the 3 that
19
-
form part of a set, but the fourth book still costs $8.
15
+
Note: that if you buy four books, of which 3 are different titles, you get a 10% discount on the 3 that form part of a set, but the fourth book still costs $8.
20
16
21
-
Your mission is to write a piece of code to calculate the
22
-
price of any conceivable shopping basket (containing only
23
-
books of the same series), giving as big a discount as
24
-
possible.
17
+
Your mission is to write a piece of code to calculate the price of any conceivable shopping basket (containing only books of the same series), giving as big a discount as possible.
25
18
26
19
For example, how much does this basket of books cost?
0 commit comments