Solve python/exercises/currency-exchange
With help of https://exercism.org/tracks/python/exercises/currency-exchange/solutions/dollymolly as I didn't understand the last instruction.
This commit is contained in:
parent
acadad2eac
commit
64e1e4f1c2
1 changed files with 4 additions and 5 deletions
|
@ -72,9 +72,8 @@ def exchangeable_value(budget, exchange_rate, spread, denomination):
|
|||
:return: int - maximum value you can get.
|
||||
"""
|
||||
|
||||
exchange = exchange_rate / 100
|
||||
cost = exchange - spread
|
||||
rate = exchange_rate + exchange_rate * spread / 100
|
||||
new = exchange_money(budget, rate)
|
||||
bill = get_number_of_bills(new, denomination)
|
||||
|
||||
result = budget - cost * denomination
|
||||
|
||||
return result
|
||||
return get_value_of_bills(denomination, bill)
|
||||
|
|
Loading…
Reference in a new issue