def get_exchange_rate(): """ Returns the NZD to ILS exchange rate. Update this value or hook it up to a live API as needed. """ return 2.07 # Example: 1 NZD ≈ 2.07 ILS (check for current rate) def nzd_to_ils(amount_nzd): """ Converts NZD to ILS. :param amount_nzd: Amount in New Zealand Dollars :return: Equivalent amount in Israeli New Shekel """ rate = get_exchange_rate() result = amount_nzd * rate return round(result, 2) def ils_to_nzd(amount_ils): """ Converts ILS to NZD. :param amount_ils: Amount in Israeli New Shekel :return: Equivalent amount in New Zealand Dollars """ rate = get_exchange_rate() result = amount_ils / rate return round(result, 2) # Testing test_nzd = [1, 50, 100, 500] test_ils = [1, 50, 100, 500] for amount in test_nzd: print(f"NZD {amount:.2f} = ILS {nzd_to_ils(amount):.2f}") print() for amount in test_ils: print(f"ILS {amount:.2f} = NZD {ils_to_nzd(amount):.2f}")