{ "metadata": { "name": "", "signature": "sha256:f3ff9d889b7b7951c347d942d053d9fde4d57e52c21d53b779e2930b738a9f69" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 1: Introduction" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1, page no. 18" ] }, { "cell_type": "code", "collapsed": false, "input": [ "print \"Hello World\"\n", "print \"Bye.\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Hello World\n", "Bye\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2, page no. 24" ] }, { "cell_type": "code", "collapsed": false, "input": [ "Print \"Hello World\"\n", "#This program will give error" ], "language": "python", "metadata": {}, "outputs": [ { "ename": "SyntaxError", "evalue": "invalid syntax (, line 1)", "output_type": "pyerr", "traceback": [ "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m1\u001b[0m\n\u001b[1;33m Print \"Hello World\"\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3, page no. 24" ] }, { "cell_type": "code", "collapsed": false, "input": [ "print \"Hello World\"\n", "print \"Bye.\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Hello World\n", "Bye.\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 4, page no. 24" ] }, { "cell_type": "code", "collapsed": false, "input": [ "print \"Hello World\";print \"Bye.\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Hello World\n", "Bye.\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5, page no. 25" ] }, { "cell_type": "code", "collapsed": false, "input": [ "print \"\\\n", " Hello World\"\n", "\n", "print \"\\\n", " Bye.\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Hello World\n", " Bye.\n" ] } ], "prompt_number": 6 } ], "metadata": {} } ] }