"\u001b[0;32m<ipython-input-6-29bc3fadc58a>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mthe_count\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m10\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m3\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m4\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mfour\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m5\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0msix\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m30\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mTypeError\u001b[0m: the_count() got multiple values for argument 'four'"
]
}
],
"source": [
"the_count(10,2,3,4,four=5,six=30)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Python 3 5/9 == 0.556\n",
"Python 3 5//9 == 0\n",
"Python 2 5/9 == 0\n"
]
}
],
"source": [
"# An aside on integer division, in python 2 integer division worked \n",
"# differently. It always rounded down to the nearest integer.\n",
"# The Python 2 behavior can still be accessed via double slash:\n",
"print(f\"Python 3 5/9 == {5/9:0.3}\")\n",
"print(f\"Python 3 5//9 == {5//9}\")\n",
"print(f\"Python 2 5/9 == {5//9}\")"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"def kelvin_to_celsius(temperature):\n",
" return temperature - 273.15"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# Using functions we have defined in new functions works as expected:\n",
"\u001b[0;32m<ipython-input-21-101c36968c6d>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mnext\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0ml\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",