Skip to content

Instantly share code, notes, and snippets.

@colelawrence
Created September 28, 2015 00:20
Show Gist options
  • Select an option

  • Save colelawrence/cb8bdde563910af39655 to your computer and use it in GitHub Desktop.

Select an option

Save colelawrence/cb8bdde563910af39655 to your computer and use it in GitHub Desktop.
Clear()
# Nominal GDP
Say "2008 Nominal GDP: " + gdp08 = 1 * 115 + 2 * 175
Say "2009 Nominal GDP: " + gdp09 = 2 * 150 + 4 * 180
Say "2010 Nominal GDP: " + gdp10 = 4 * 120 + 4 * 190
# Real GDP
Say "2008 Real GDP b08: " + gdp0808 = 1 * 115 + 2 * 175
Say "2009 Real GDP b08: " + gdp0908 = 1 * 150 + 2 * 180
Say "2010 Real GDP b08: " + gdp1008 = 1 * 120 + 2 * 190
# GDP Deflators
Say "Deflator 2008: " + def08 = gdp08 / gdp0808
Say "Deflator 2009: " + def09 = gdp09 / gdp0908
Say "Deflator 2010: " + def10 = gdp10 / gdp1008
Say "Inflation 09: " + (def09 - def08) / def08
Say "Inflation 10: " + (def10 - def09) / def09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment