Advertisement
gray_beard

Untitled

Sep 2nd, 2021
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.68 KB | None | 0 0
  1. КОНСТРУКЦИЯ №1 - не проходит тесты
  2. class CashCalculator(Calculator):
  3.     RUB_RATE = 1.00
  4.     USD_RATE = 75.00
  5.     EURO_RATE = 85.00
  6.     RATES = {
  7.             'rub': ['руб', RUB_RATE],
  8.             'usd': ['USD', USD_RATE],
  9.             'eur': ['Euro', EURO_RATE]
  10.         }
  11.  
  12. КОНСТРУКЦИЯ №2 - проходит тесты
  13. class CashCalculator(Calculator):
  14.     RUB_RATE = 1.00
  15.     USD_RATE = 75.00
  16.     EURO_RATE = 85.00
  17.  
  18.     def get_today_cash_remained(self, currency):
  19.         rates = {
  20.             'rub': ['руб', self.RUB_RATE],
  21.             'usd': ['USD', self.USD_RATE],
  22.             'eur': ['Euro', self.EURO_RATE]
  23.         }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement