''' A currency exchange calculator '''defexchange_money(budget:float,exchange_rate:float):"""
calculate the value of exchanged curreny
:param budget: float - amount of money you are planning to exchange.
:param exchange_rate: float - unit value of the foreign currency.
:return: float - exchanged value of the foreign currency you can receive.
"""returnbudget/exchange_ratedefget_change(budget,exchanging_value):"""
:param budget: float - amount of money you own.
:param exchanging_value: float - amount of your money you want to exchange now.
:return: float - amount left of your starting currency after exchanging.
"""returnbudget-exchanging_valuedefget_value_of_bills(denomination,number_of_bills):"""
:param denomination: int - the value of a bill.
:param number_of_bills: int - amount of bills you received.
:return: int - total value of bills you now have.
"""returndenomination*number_of_billsdefget_number_of_bills(budget,denomination):"""
:param budget: float - the amount of money you are planning to exchange.
:param denomination: int - the value of a single bill.
:return: int - number of bills after exchanging all your money.
"""returnbudget//denominationdefget_leftover_of_bills(budget,denomination):"""
:param budget: float - the amount of money you are planning to exchange.
:param denomination: int - the value of a single bill.
:return: float - the leftover amount that cannot be exchanged given the current denomination.
"""returnbudget%denominationdefexchangeable_value(budget,exchange_rate,spread,denomination):"""
:param budget: float - the amount of your money you are planning to exchange.
:param exchange_rate: float - the unit value of the foreign currency.
:param spread: int - percentage that is taken as an exchange fee.
:param denomination: int - the value of a single bill.
:return: int - maximum value you can get.
"""actual_rate=exchange_rate*(1+spread/100)value_after_exchange=exchange_money(budget,actual_rate)returnget_value_of_bills(denomination,get_number_of_bills(value_after_exchange,denomination))