exercism/python/currency-exchange/HINTS.md

1.5 KiB

Hints

General

1. Estimating exchangeable value

2. Changes after exchanging

3. Calculate value of bills

4. Calculate number of bills

  • You need to divide budget into denomination.

  • You need to use type casting to int to get the exact number of bills.

  • To remove decimal places from a float, you can convert it to int.

    Note: The // operator also does floor division. But, if the operand has float, the result is still float.

5. Calculate exchangeable value

  • You need to calculate spread percent of exchange_rate using multiplication operator and add it to exchange_rate to get the exchanged currency.
  • The actual rate needs to be computed. Remember to add exchange rate and exchange fee.
  • You can get exchanged money affected by commission by using divide operation and type casting int.