Skip to content

Instantly share code, notes, and snippets.

@laprice
Created November 8, 2013 07:09
Show Gist options
  • Save laprice/7367330 to your computer and use it in GitHub Desktop.
Save laprice/7367330 to your computer and use it in GitHub Desktop.
Calculates cost of a Big Mac in BTC
{
"metadata": {
"name": "Big Mac to BTC"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": [
"current_btx = 304.53\n",
"current_satoshis = current_btx / 100000000\n",
"current_satoshis"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "pyout",
"prompt_number": 14,
"text": [
"3.0453e-06"
]
}
],
"prompt_number": 14
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"big_mac = 3.75\n",
"big_mac_btc = big_mac / current_btx\n",
"print big_mac_btc\n",
"print current_btx * big_mac_btc"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"0.0123140577283\n",
"3.75\n"
]
}
],
"prompt_number": 17
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment