mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
14 lines
355 B
Python
14 lines
355 B
Python
class Exchanger:
|
|
|
|
def __init__(self, quote_currencies):
|
|
self.quote_currencies = quote_currencies
|
|
|
|
def exchange(self, btc_amount, quote_currency):
|
|
assert quote_currency in self.quote_currencies
|
|
|
|
return btc_amount * 6
|
|
|
|
if __name__ == "__main__":
|
|
exch = Exchanger(("EUR", "USD", "GBP"))
|
|
print exch.exchange(1, "EUR")
|
|
|