Skip to content

Instantly share code, notes, and snippets.

@c-rhodes
Created February 23, 2015 21:26
Show Gist options
  • Save c-rhodes/89d384f7ee58bc848c46 to your computer and use it in GitHub Desktop.
Save c-rhodes/89d384f7ee58bc848c46 to your computer and use it in GitHub Desktop.
Example 1 for Decision Mathematics
Display the source blob
Display the rendered blob
Raw
{
"metadata": {
"name": "",
"signature": "sha256:9e514c8b3acc9a19e3124562ed2e4154497274c04fb8f29690b379141ba1f0a9"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": [
"n, A = 1, 10\n",
"Un = [10, 15, 9, 7, 11]\n",
"for n in range(1, 5):\n",
" T = Un[n]\n",
" if T < A:\n",
" A = T\n",
"print('Output is {}'.format(A))"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Output is 7\n"
]
}
],
"prompt_number": 1
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment