Skip to content

Instantly share code, notes, and snippets.

@theskumar
Last active December 20, 2015 14:59
Show Gist options
  • Save theskumar/6150535 to your computer and use it in GitHub Desktop.
Save theskumar/6150535 to your computer and use it in GitHub Desktop.
{
"metadata": {
"name": "exercise"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": "Hello world Program"
},
{
"cell_type": "code",
"collapsed": false,
"input": "print \"hello world\"",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "hello world\n"
}
],
"prompt_number": 4
},
{
"cell_type": "code",
"collapsed": false,
"input": "numbers = [ \"zero\", \"one\", \"two\", \"three\", \"FOUR\" ]\nprint numbers",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "['zero', 'one', 'two', 'three', 'FOUR']\n"
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 4,
"metadata": {},
"source": "Multi-dimensional Arrays"
},
{
"cell_type": "code",
"collapsed": false,
"input": "numbers = [ [\"zero\", \"one\"], [\"two\", \"three\", \"FOUR\" ] ]\nprint \"numbers[0] = \", numbers[0]\nprint \"numbers[1] = \", numbers[1]",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "numbers[0] = ['zero', 'one']\nnumbers[1] = ['two', 'three', 'FOUR']\n"
}
],
"prompt_number": 6
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment