{ "metadata": { "name": "basic_training" }, "nbformat": 2, "worksheets": [ { "cells": [ { "cell_type": "markdown", "source": [ "01_BasicTraining", "=============" ] }, { "cell_type": "code", "collapsed": false, "input": [ "print \"Hello World!\"" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Hello World!" ] } ], "prompt_number": 1 }, { "cell_type": "markdown", "source": [ "### Calculator ###" ] }, { "cell_type": "code", "collapsed": false, "input": [ "print 2 + 2" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "4" ] } ], "prompt_number": 2 }, { "cell_type": "code", "collapsed": false, "input": [ "2 + 2" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 3, "text": [ "4" ] } ], "prompt_number": 3 }, { "cell_type": "code", "collapsed": false, "input": [ "print 2.1 + 2" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "4.1" ] } ], "prompt_number": 4 }, { "cell_type": "code", "collapsed": false, "input": [ "2.1 + 2 == 4.0999999999999996" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 5, "text": [ "True" ] } ], "prompt_number": 5 }, { "cell_type": "markdown", "source": [ "### Longs and complex types ###" ] }, { "cell_type": "code", "collapsed": false, "input": [ "2L" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 6, "text": [ "2L" ] } ], "prompt_number": 6 }, { "cell_type": "code", "collapsed": false, "input": [ "2L + 2" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 7, "text": [ "4L" ] } ], "prompt_number": 7 }, { "cell_type": "code", "collapsed": false, "input": [ "2L/2" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 8, "text": [ "1L" ] } ], "prompt_number": 8 }, { "cell_type": "code", "collapsed": false, "input": [ "2L/2.0" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 9, "text": [ "1.0" ] } ], "prompt_number": 9 }, { "cell_type": "code", "collapsed": false, "input": [ "complex(1,2)" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 10, "text": [ "(1+2j)" ] } ], "prompt_number": 10 }, { "cell_type": "code", "collapsed": false, "input": [ "1+2j" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 11, "text": [ "(1+2j)" ] } ], "prompt_number": 11 }, { "cell_type": "code", "collapsed": false, "input": [ "1 + 2j - 2j" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 12, "text": [ "(1+0j)" ] } ], "prompt_number": 12 }, { "cell_type": "markdown", "source": [ "- variables are assigned on the fly", "- multiplication, division, exponents as you expect" ] }, { "cell_type": "code", "collapsed": false, "input": [ "(3.0*10.0 - 25.0)/5.0" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 13, "text": [ "1.0" ] } ], "prompt_number": 13 }, { "cell_type": "code", "collapsed": false, "input": [ "print 3.085e18*1e6 # this is a Megaparsec in units of cm!" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "3.085e+24" ] } ], "prompt_number": 14 }, { "cell_type": "code", "collapsed": false, "input": [ "t = 1.0 # declare a variable t (time)", "accel = 9.8 # acceleration in units of m/s^2", "# distance travelled in time t seconds is 1/2 a*t**2", "dist = 0.5*accel*t*t", "print dist # this is the distance in meters" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "4.9" ] } ], "prompt_number": 15 }, { "cell_type": "code", "collapsed": false, "input": [ "dist1 = accel*(t**2)/2", "print dist1" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "4.9" ] } ], "prompt_number": 16 }, { "cell_type": "code", "collapsed": false, "input": [ "dist2 = 0.5*accel*pow(t,2)", "print dist2" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "4.9" ] } ], "prompt_number": 17 }, { "cell_type": "markdown", "source": [ "Some Mathy Operators" ] }, { "cell_type": "code", "collapsed": false, "input": [ "print 6 / 5 ; print 9 / 5 # integer division returns the floor" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "1", "1" ] } ], "prompt_number": 18 }, { "cell_type": "code", "collapsed": false, "input": [ "6 % 5 # mod operator" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 19, "text": [ "1" ] } ], "prompt_number": 19 }, { "cell_type": "code", "collapsed": false, "input": [ "1 << 2 ## shift: move the number 1 by two bits to the left", " ## that is make a new number 100 (base 2)" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 20, "text": [ "4" ] } ], "prompt_number": 20 }, { "cell_type": "code", "collapsed": false, "input": [ "5 >> 1 ## shift: move the number 5 = 101 (base 2) one to", " ## to the right (10 = 2)" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 21, "text": [ "2" ] } ], "prompt_number": 21 }, { "cell_type": "code", "collapsed": false, "input": [ "x = 2 ; y = 3 ## assign two variables on the same line!", "x | y ## bitwise OR" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 22, "text": [ "3" ] } ], "prompt_number": 22 }, { "cell_type": "code", "collapsed": false, "input": [ "x ^ y ## exclusive OR (10 ^ 11 = 01)" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 23, "text": [ "1" ] } ], "prompt_number": 23 }, { "cell_type": "code", "collapsed": false, "input": [ "x & y ## bitwise AND" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 24, "text": [ "2" ] } ], "prompt_number": 24 }, { "cell_type": "code", "collapsed": false, "input": [ "x = x ^ y ; print x" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "1" ] } ], "prompt_number": 25 }, { "cell_type": "code", "collapsed": false, "input": [ "x += 3 ; print x" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "4" ] } ], "prompt_number": 26 }, { "cell_type": "code", "collapsed": false, "input": [ "x /= 2.0", "print x" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "2.0" ] } ], "prompt_number": 27 }, { "cell_type": "markdown", "source": [ "Testing Relationships" ] }, { "cell_type": "code", "collapsed": false, "input": [ "dist1 = 4.9 ; dist = 4.9", "dist1 == dist" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 28, "text": [ "True" ] } ], "prompt_number": 28 }, { "cell_type": "code", "collapsed": false, "input": [ "dist < 10" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 29, "text": [ "True" ] } ], "prompt_number": 29 }, { "cell_type": "code", "collapsed": false, "input": [ "dist <= 4.9" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 30, "text": [ "True" ] } ], "prompt_number": 30 }, { "cell_type": "code", "collapsed": false, "input": [ "dist < (10 + 2j)" ], "language": "python", "outputs": [ { "ename": "TypeError", "evalue": "no ordering relation is defined for complex numbers", "output_type": "pyerr", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m/Users/jbloom/Classes/python-bootcamp/DataFiles_and_Notebooks/01_BasicTraining/\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mdist\u001b[0m \u001b[0;34m<\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;36m10\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;36m2j\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[0;31mTypeError\u001b[0m: no ordering relation is defined for complex numbers" ] } ], "prompt_number": 31 }, { "cell_type": "code", "collapsed": false, "input": [ "dist < -2.0" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 32, "text": [ "False" ] } ], "prompt_number": 32 }, { "cell_type": "code", "collapsed": false, "input": [ "dist != 3.1415 # in the future you could use math.pi" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 33, "text": [ "True" ] } ], "prompt_number": 33 }, { "cell_type": "markdown", "source": [ "#### More on Variables & Types ####", "##### None, numbers and truth #####" ] }, { "cell_type": "code", "collapsed": false, "input": [ "0 == False" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 34, "text": [ "True" ] } ], "prompt_number": 34 }, { "cell_type": "code", "collapsed": false, "input": [ "not False" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 35, "text": [ "True" ] } ], "prompt_number": 35 }, { "cell_type": "code", "collapsed": false, "input": [ "0.0 == False" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 36, "text": [ "True" ] } ], "prompt_number": 36 }, { "cell_type": "code", "collapsed": false, "input": [ "not (10.0 - 10.0)" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 37, "text": [ "True" ] } ], "prompt_number": 37 }, { "cell_type": "code", "collapsed": false, "input": [ "not -1" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 38, "text": [ "False" ] } ], "prompt_number": 38 }, { "cell_type": "code", "collapsed": false, "input": [ "not 3.1415" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 39, "text": [ "False" ] } ], "prompt_number": 39 }, { "cell_type": "code", "collapsed": false, "input": [ "x = None # None is something special. Not true or false", "print None == False", "print None == True", "print None == None" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "False", "False", "True" ] } ], "prompt_number": 40 }, { "cell_type": "code", "collapsed": false, "input": [ "print False or True", "print False and True" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "True", "False" ] } ], "prompt_number": 41 }, { "cell_type": "markdown", "source": [ "#### More on Variables & Types ####" ] }, { "cell_type": "code", "collapsed": false, "input": [ "print type(1)" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "" ] } ], "prompt_number": 42 }, { "cell_type": "code", "collapsed": false, "input": [ "x = 2 ; print type(x)" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "" ] } ], "prompt_number": 43 }, { "cell_type": "code", "collapsed": false, "input": [ "type(2) == type(1)" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 44, "text": [ "True" ] } ], "prompt_number": 44 }, { "cell_type": "code", "collapsed": false, "input": [ "print type(True)" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "" ] } ], "prompt_number": 45 }, { "cell_type": "code", "collapsed": false, "input": [ "print type(type(1))" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "" ] } ], "prompt_number": 46 }, { "cell_type": "code", "collapsed": false, "input": [ "print type(pow)" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "" ] } ], "prompt_number": 47 }, { "cell_type": "markdown", "source": [ "we can test whether something is a certain type with `isinstance()`" ] }, { "cell_type": "code", "collapsed": false, "input": [ "print isinstance(1,int)", "print isinstance(\"spam\",str)", "print isinstance(1.212,int)" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "True", "True", "False" ] } ], "prompt_number": 48 }, { "cell_type": "markdown", "source": [ "builtin-types: `int`, `bool`, `str`, `float`, `complex`, `long`...." ] }, { "cell_type": "markdown", "source": [ "### Strings ###" ] }, { "cell_type": "code", "collapsed": false, "input": [ "x = \"spam\" ; type(x)" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 49, "text": [ "str" ] } ], "prompt_number": 49 }, { "cell_type": "code", "collapsed": false, "input": [ "print \"hello!\\n...my sire.\"" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "hello!", "...my sire." ] } ], "prompt_number": 50 }, { "cell_type": "code", "collapsed": false, "input": [ "\"hello!\\n...my sire.\"" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 51, "text": [ "'hello!\\n...my sire.'" ] } ], "prompt_number": 51 }, { "cell_type": "code", "collapsed": false, "input": [ "\"wah?!\" == 'wah?!'" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 52, "text": [ "True" ] } ], "prompt_number": 52 }, { "cell_type": "code", "collapsed": false, "input": [ "print \"'wah?!' said the student\"" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "'wah?!' said the student" ] } ], "prompt_number": 53 }, { "cell_type": "code", "collapsed": false, "input": [ "print \"\\\"wah?!\\\" said the student\"" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "\"wah?!\" said the student" ] } ], "prompt_number": 54 }, { "cell_type": "markdown", "source": [ "backslashes (`\\`) start special (escape) characters:", "", " \\n = newline (\\r = return)", " \\t = tab", " \\a = bell", "", "string literals are defined with double quotes or quotes.", "the outermost quote type cannot be used inside the string (unless it's escaped with a backslash)" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# raw strings don't escape characters", "print r'This is a raw string...newlines \\r\\n are ignored.'" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "This is a raw string...newlines \\r\\n are ignored." ] } ], "prompt_number": 55 }, { "cell_type": "code", "collapsed": false, "input": [ "# Triple quotes are real useful for multiple line strings", "y = '''For score and seven minutes ago,", " you folks all learned some basic mathy stuff with Python", " and boy were you blown away!'''", "print y" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "For score and seven minutes ago,", " you folks all learned some basic mathy stuff with Python", " and boy were you blown away!" ] } ], "prompt_number": 56 }, { "cell_type": "markdown", "source": [ "* prepending `r` makes that string \"raw\"", "* triple quotes allow you to compose long strings", "* prepending `u` makes that string \"unicode\"", "", "http://docs.python.org/reference/lexical_analysis.html#string-literals" ] }, { "cell_type": "code", "collapsed": false, "input": [ "s = \"spam\" ; e = \"eggs\"", "print s + e" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "spameggs" ] } ], "prompt_number": 57 }, { "cell_type": "code", "collapsed": false, "input": [ "print s + \" and \" + e" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "spam and eggs" ] } ], "prompt_number": 58 }, { "cell_type": "code", "collapsed": false, "input": [ "print \"green \" + e + \" and\\n \" + s" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "green eggs and", " spam" ] } ], "prompt_number": 59 }, { "cell_type": "code", "collapsed": false, "input": [ "print s*3 + e" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "spamspamspameggs" ] } ], "prompt_number": 60 }, { "cell_type": "code", "collapsed": false, "input": [ "print \"*\"*50" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "**************************************************" ] } ], "prompt_number": 61 }, { "cell_type": "code", "collapsed": false, "input": [ "print \"spam\" is \"good\" ; print \"spam\" is \"spam\"" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "False", "True" ] } ], "prompt_number": 62 }, { "cell_type": "code", "collapsed": false, "input": [ "\"spam\" < \"zoo\"" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 63, "text": [ "True" ] } ], "prompt_number": 63 }, { "cell_type": "code", "collapsed": false, "input": [ "\"s\" < \"spam\"" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 64, "text": [ "True" ] } ], "prompt_number": 64 }, { "cell_type": "markdown", "source": [ "* you can concatenate strings with `+` sign", "* you can do multiple concatenations with the `*` sign", "* strings can be compared" ] }, { "cell_type": "code", "collapsed": false, "input": [ "print 'I want' + 3 + ' eggs and no ' + s" ], "language": "python", "outputs": [ { "ename": "TypeError", "evalue": "cannot concatenate 'str' and 'int' objects", "output_type": "pyerr", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m/Users/jbloom/Classes/python-bootcamp/DataFiles_and_Notebooks/01_BasicTraining/\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mprint\u001b[0m \u001b[0;34m'I want'\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;36m3\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;34m' eggs and no '\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0ms\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[0;31mTypeError\u001b[0m: cannot concatenate 'str' and 'int' objects" ] } ], "prompt_number": 65 }, { "cell_type": "code", "collapsed": false, "input": [ "print 'I want ' + str(3) + ' eggs and no ' + s " ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "I want 3 eggs and no spam" ] } ], "prompt_number": 66 }, { "cell_type": "code", "collapsed": false, "input": [ "pi = 3.14159", "print 'I want ' + str(pi) + ' eggs and no ' + s" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "I want 3.14159 eggs and no spam" ] } ], "prompt_number": 67 }, { "cell_type": "code", "collapsed": false, "input": [ "print str(True) + \":\" + ' I want ' + str(pi) + ' eggs and no ' + s" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "True: I want 3.14159 eggs and no spam" ] } ], "prompt_number": 68 }, { "cell_type": "markdown", "source": [ "you must concatenate only strings, coercing (\"casting\") ", "other variable types to `str`" ] }, { "cell_type": "markdown", "source": [ "We can think of strings as arrays", "(although, unlike in C you never really need to deal with directly addressing character locations in memory)" ] }, { "cell_type": "code", "collapsed": false, "input": [ "s = 'spam'", "len(s)" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 69, "text": [ "4" ] } ], "prompt_number": 69 }, { "cell_type": "code", "collapsed": false, "input": [ "len(\"eggs\\n\")", "len(\"\")" ], "language": "python", "outputs": [ { "output_type": "pyout", "prompt_number": 70, "text": [ "0" ] } ], "prompt_number": 70 }, { "cell_type": "code", "collapsed": false, "input": [ "print s[0]", "print s[-1]" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "s", "m" ] } ], "prompt_number": 71 }, { "cell_type": "markdown", "source": [ "* `len()` gives us the length of an array", "* strings are zero indexed", "* can also count backwards" ] }, { "cell_type": "markdown", "source": [ "### Flow is done within blocks (where indentation matters) ###" ] }, { "cell_type": "code", "collapsed": false, "input": [ "x = 1", "if x > 0:", " print \"yo\"", "else:", " print \"dude\"" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "yo" ] } ], "prompt_number": 72 }, { "cell_type": "code", "collapsed": false, "input": [ "x = 1", "if x > 0:", " print \"yo\"", "else:", " print \"dude\"" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "yo" ] } ], "prompt_number": 73 }, { "cell_type": "markdown", "source": [ "One liners" ] }, { "cell_type": "code", "collapsed": false, "input": [ "print \"yo\" if x > 0 else \"dude\"" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "yo" ] } ], "prompt_number": 74 }, { "cell_type": "markdown", "source": [ "case statements can be constructed with ", "just a bunch of `if`, `elif`,...`else`" ] }, { "cell_type": "code", "collapsed": false, "input": [ "if x < 1:", " print \"t\"", "elif x > 100:", " print \"yo\"", "else:", " print \"dude\"" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "dude" ] } ], "prompt_number": 75 }, { "cell_type": "markdown", "source": [ "ordering matters. The first block of `True` in an if/elif gets executed then everything else does not.", "", "#### blocks cannot be empty ####" ] }, { "cell_type": "code", "collapsed": false, "input": [ "x = \"fried goldfish\"", "if x == \"spam for dinner\":", " print \"I will destroy the universe\"", "else:", " # I'm fine with that. I'll do nothing" ], "language": "python", "outputs": [ { "ename": "IndentationError", "evalue": "expected an indented block (, line 5)", "output_type": "pyerr", "traceback": [ "\u001b[0;31mIndentationError\u001b[0m\u001b[0;31m:\u001b[0m expected an indented block\n" ] } ], "prompt_number": 76 }, { "cell_type": "code", "collapsed": true, "input": [ "x = \"fried goldfish\"", "if x == \"spam for dinner\":", " print \"I will destroy the universe\"", "else:", " # I'm fine with that. I'll do nothing", " pass" ], "language": "python", "outputs": [], "prompt_number": 77 }, { "cell_type": "markdown", "source": [ "`pass` is a \"do nothing\"/NOP statement" ] }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "outputs": [], "prompt_number": 77 } ] } ] }