14. Create a Test

Create a Test Event

In the previous helloudacity example, you saw how to create a "test request" and trigger an event for your function to respond to. Now, you can do that with the make change example!

Task Description:

Create a test event.

Task List:

Task Feedback:

Great! Note the output - does this seem like the correct amount of change for your input request?

Look at the JSON response to the requested amount of 1.42, what is the exact format of the returned JSON response?

SOLUTION: {5: "quarters", 1: "dimes", 1: "nickels", 2: "pennies"}

An Additional Challenge

There are many ways you can build off of this simple function, as an additional challenge:

  • See if you can make a similar function that calculates change in a different currency, such as in Mexican pesos.
  • See if you can write a different function that does currency conversion between two different currencies, at a current exchange rate.