{ "metadata": { "name": "ex.1" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# \u4e60\u98981: \u7b2c\u4e00\u4e2a\u7a0b\u5e8f\n", "\n", "\u8f93\u5165:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "print \"Hello World!\"\n", "print \"Hello Again\"\n", "print \"I like typing this.\"\n", "print \"This is fun.\"\n", "print 'Yay! Printing.'\n", "print \"I'd much rather you 'not'.\"\n", "print 'I \"said\" do not touch this.'" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Hello World!\n", "Hello Again\n", "I like typing this.\n", "This is fun.\n", "Yay! Printing.\n", "I'd much rather you 'not'.\n", "I \"said\" do not touch this.\n" ] } ], "prompt_number": 1 }, { "cell_type": "markdown", "metadata": {}, "source": [ "\u6309SHIFT+ENTER\u8fd0\u884c." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## \u5173\u4e8eIPython\n", "\n", "* \u6bcf\u4e2acell\u662f\u4e00\u4e2a\u53ef\u6267\u884c\u5355\u5143, \u540c\u4e00\u4e2anotebook\u91cc\u7684\u4e0d\u540ccell\u5171\u4eab\u540c\u4e00\u4e2a\u4e0a\u4e0b\u6587.\n", "* Cell\u91cc\u53ef\u4ee5\u5199Python\u4ee3\u7801, \u4e5f\u53ef\u4ee5\u5199[Markdown](http://en.wikipedia.org/wiki/Markdown).\n", "* Cell\u652f\u6301\u4e00\u822c\u7f16\u8f91\u5668\u529f\u80fd(\u91cd\u590d, \u64a4\u9500), \u652f\u6301\u4ee3\u7801\u8865\u5168.\n", "* \u4e00\u4e2acell\u91cc\u7684\u4ee3\u7801\u53ef\u4ee5\u91cd\u590d\u6267\u884c(run in place). \u5feb\u6377\u952eCTRL+ENTER.\n", "* \u53ef\u4ee5\u5728Help Keyboard shortcuts\u91cc\u67e5\u770b\u5feb\u6377\u952e." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## \u9519\u8bef\u4fe1\u606f" ] }, { "cell_type": "code", "collapsed": false, "input": [ "print \"Hello World!\"\n", "print \"Hello Again\"\n", "print \"I like typing this." ], "language": "python", "metadata": {}, "outputs": [ { "ename": "SyntaxError", "evalue": "EOL while scanning string literal (, line 3)", "output_type": "pyerr", "traceback": [ "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m3\u001b[0m\n\u001b[1;33m print \"I like typing this.\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m EOL while scanning string literal\n" ] } ], "prompt_number": 2 } ], "metadata": {} } ] }