Skip to content

Instantly share code, notes, and snippets.

@deanmalmgren
Last active February 23, 2016 14:59
Show Gist options
  • Save deanmalmgren/934a550c09f1a1e1bc6f to your computer and use it in GitHub Desktop.
Save deanmalmgren/934a550c09f1a1e1bc6f to your computer and use it in GitHub Desktop.
random number generator

no idea if this will work or not.

Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"import random"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"'and so forth'"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"choices = [\n",
" \"option 1\", \n",
" \"option 2\",\n",
" \"option 3\",\n",
" \"and so forth\",\n",
"]\n",
"random.choice(choices)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.10"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment