You will work out the terms of trade of a country that exports coffee, year by year, and find how much more coffee it must sell to keep buying the same imports.
The idea. Terms of trade export price index import price index . To buy the same imports as in the base year, the exports must be times as large. The indices below are made up for practice.
Your tasks.
terms, return the list of the terms of trade, one for each year.first_below, return the first year (counting from 1) whose terms of trade are below level, or None.extra_exports, return the percentage by which exports must grow in a given year, compared with the base year.Run your code once to unlock the worked solution.
Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…