##// END OF EJS Templates
print is a function in Python 3
Julia Evans -
Show More
@@ -1,46 +1,46 b''
1 1 {
2 2 "metadata": {
3 3 "name": ""
4 4 },
5 5 "nbformat": 3,
6 6 "nbformat_minor": 0,
7 7 "worksheets": [
8 8 {
9 9 "cells": [
10 10 {
11 11 "cell_type": "code",
12 12 "collapsed": false,
13 13 "input": [
14 14 "from IPython.display import clear_output"
15 15 ],
16 16 "language": "python",
17 17 "metadata": {},
18 18 "outputs": [],
19 19 "prompt_number": 1
20 20 },
21 21 {
22 22 "cell_type": "code",
23 23 "collapsed": false,
24 24 "input": [
25 25 "for i in range(10):\n",
26 26 " clear_output()\n",
27 " print i"
27 " print(i)"
28 28 ],
29 29 "language": "python",
30 30 "metadata": {},
31 31 "outputs": [
32 32 {
33 33 "output_type": "stream",
34 34 "stream": "stdout",
35 35 "text": [
36 36 "9\n"
37 37 ]
38 38 }
39 39 ],
40 40 "prompt_number": 2
41 41 }
42 42 ],
43 43 "metadata": {}
44 44 }
45 45 ]
46 46 } No newline at end of file
@@ -1,55 +1,55 b''
1 1 {
2 2 "metadata": {
3 3 "name": ""
4 4 },
5 5 "nbformat": 3,
6 6 "nbformat_minor": 0,
7 7 "worksheets": [
8 8 {
9 9 "cells": [
10 10 {
11 11 "cell_type": "code",
12 12 "collapsed": false,
13 13 "input": [
14 14 "i, j = 1, 1"
15 15 ],
16 16 "language": "python",
17 17 "metadata": {},
18 18 "outputs": [],
19 19 "prompt_number": 1
20 20 },
21 21 {
22 22 "cell_type": "code",
23 23 "collapsed": false,
24 24 "input": [
25 25 "for m in range(10):\n",
26 26 " i, j = j, i + j\n",
27 " print j"
27 " print(j)"
28 28 ],
29 29 "language": "python",
30 30 "metadata": {},
31 31 "outputs": [
32 32 {
33 33 "output_type": "stream",
34 34 "stream": "stdout",
35 35 "text": [
36 36 "2\n",
37 37 "3\n",
38 38 "5\n",
39 39 "8\n",
40 40 "13\n",
41 41 "21\n",
42 42 "34\n",
43 43 "55\n",
44 44 "89\n",
45 45 "144\n"
46 46 ]
47 47 }
48 48 ],
49 49 "prompt_number": 2
50 50 }
51 51 ],
52 52 "metadata": {}
53 53 }
54 54 ]
55 55 } No newline at end of file
@@ -1,33 +1,33 b''
1 1 {
2 2 "metadata": {
3 3 "name": ""
4 4 },
5 5 "nbformat": 3,
6 6 "nbformat_minor": 0,
7 7 "worksheets": [
8 8 {
9 9 "cells": [
10 10 {
11 11 "cell_type": "code",
12 12 "collapsed": false,
13 13 "input": [
14 "print \"Hello World\""
14 "print(\"Hello World\")"
15 15 ],
16 16 "language": "python",
17 17 "metadata": {},
18 18 "outputs": [
19 19 {
20 20 "output_type": "stream",
21 21 "stream": "stdout",
22 22 "text": [
23 23 "Hello World\n"
24 24 ]
25 25 }
26 26 ],
27 27 "prompt_number": 1
28 28 }
29 29 ],
30 30 "metadata": {}
31 31 }
32 32 ]
33 33 } No newline at end of file
@@ -1,55 +1,55 b''
1 1 {
2 2 "metadata": {
3 3 "name": ""
4 4 },
5 5 "nbformat": 3,
6 6 "nbformat_minor": 0,
7 7 "worksheets": [
8 8 {
9 9 "cells": [
10 10 {
11 11 "cell_type": "code",
12 12 "collapsed": false,
13 13 "input": [
14 14 "1 / 0"
15 15 ],
16 16 "language": "python",
17 17 "metadata": {},
18 18 "outputs": [
19 19 {
20 20 "ename": "ZeroDivisionError",
21 21 "evalue": "integer division or modulo by zero",
22 22 "output_type": "pyerr",
23 23 "traceback": [
24 24 "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[1;31mZeroDivisionError\u001b[0m Traceback (most recent call last)",
25 25 "\u001b[1;32m<ipython-input-1-b710d87c980c>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[1;36m1\u001b[0m \u001b[1;33m/\u001b[0m \u001b[1;36m0\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
26 26 "\u001b[1;31mZeroDivisionError\u001b[0m: integer division or modulo by zero"
27 27 ]
28 28 }
29 29 ],
30 30 "prompt_number": 1
31 31 },
32 32 {
33 33 "cell_type": "code",
34 34 "collapsed": false,
35 35 "input": [
36 "print 'ok'"
36 "print('ok')"
37 37 ],
38 38 "language": "python",
39 39 "metadata": {},
40 40 "outputs": [
41 41 {
42 42 "output_type": "stream",
43 43 "stream": "stdout",
44 44 "text": [
45 45 "ok\n"
46 46 ]
47 47 }
48 48 ],
49 49 "prompt_number": 2
50 50 }
51 51 ],
52 52 "metadata": {}
53 53 }
54 54 ]
55 55 } No newline at end of file
@@ -1,33 +1,33 b''
1 1 {
2 2 "metadata": {
3 3 "name": ""
4 4 },
5 5 "nbformat": 3,
6 6 "nbformat_minor": 0,
7 7 "worksheets": [
8 8 {
9 9 "cells": [
10 10 {
11 11 "cell_type": "code",
12 12 "collapsed": false,
13 13 "input": [
14 "print '\u2603'"
14 "print('\u2603')"
15 15 ],
16 16 "language": "python",
17 17 "metadata": {},
18 18 "outputs": [
19 19 {
20 20 "output_type": "stream",
21 21 "stream": "stdout",
22 22 "text": [
23 23 "\u2603\n"
24 24 ]
25 25 }
26 26 ],
27 27 "prompt_number": 1
28 28 }
29 29 ],
30 30 "metadata": {}
31 31 }
32 32 ]
33 33 } No newline at end of file
@@ -1,36 +1,36 b''
1 1 {
2 2 "metadata": {
3 3 "name": ""
4 4 },
5 5 "nbformat": 3,
6 6 "nbformat_minor": 0,
7 7 "worksheets": [
8 8 {
9 9 "cells": [
10 10 {
11 11 "cell_type": "code",
12 12 "collapsed": false,
13 13 "input": [
14 14 "from IPython.display import clear_output"
15 15 ],
16 16 "language": "python",
17 17 "metadata": {},
18 18 "outputs": []
19 19 },
20 20 {
21 21 "cell_type": "code",
22 22 "collapsed": false,
23 23 "input": [
24 24 "for i in range(10):\n",
25 25 " clear_output()\n",
26 " print i"
26 " print(i)"
27 27 ],
28 28 "language": "python",
29 29 "metadata": {},
30 30 "outputs": []
31 31 }
32 32 ],
33 33 "metadata": {}
34 34 }
35 35 ]
36 36 } No newline at end of file
@@ -1,36 +1,36 b''
1 1 {
2 2 "metadata": {
3 3 "name": ""
4 4 },
5 5 "nbformat": 3,
6 6 "nbformat_minor": 0,
7 7 "worksheets": [
8 8 {
9 9 "cells": [
10 10 {
11 11 "cell_type": "code",
12 12 "collapsed": false,
13 13 "input": [
14 14 "i, j = 1, 1"
15 15 ],
16 16 "language": "python",
17 17 "metadata": {},
18 18 "outputs": []
19 19 },
20 20 {
21 21 "cell_type": "code",
22 22 "collapsed": false,
23 23 "input": [
24 24 "for m in range(10):\n",
25 25 " i, j = j, i + j\n",
26 " print j"
26 " print(j)"
27 27 ],
28 28 "language": "python",
29 29 "metadata": {},
30 30 "outputs": []
31 31 }
32 32 ],
33 33 "metadata": {}
34 34 }
35 35 ]
36 36 } No newline at end of file
@@ -1,24 +1,24 b''
1 1 {
2 2 "metadata": {
3 3 "name": ""
4 4 },
5 5 "nbformat": 3,
6 6 "nbformat_minor": 0,
7 7 "worksheets": [
8 8 {
9 9 "cells": [
10 10 {
11 11 "cell_type": "code",
12 12 "collapsed": false,
13 13 "input": [
14 "print \"Hello World\""
14 "print(\"Hello World\")"
15 15 ],
16 16 "language": "python",
17 17 "metadata": {},
18 18 "outputs": []
19 19 }
20 20 ],
21 21 "metadata": {}
22 22 }
23 23 ]
24 24 } No newline at end of file
@@ -1,55 +1,55 b''
1 1 {
2 2 "metadata": {
3 3 "name": ""
4 4 },
5 5 "nbformat": 3,
6 6 "nbformat_minor": 0,
7 7 "worksheets": [
8 8 {
9 9 "cells": [
10 10 {
11 11 "cell_type": "code",
12 12 "collapsed": false,
13 13 "input": [
14 14 "1 / 0"
15 15 ],
16 16 "language": "python",
17 17 "metadata": {},
18 18 "outputs": [
19 19 {
20 20 "ename": "ZeroDivisionError",
21 21 "evalue": "integer division or modulo by zero",
22 22 "output_type": "pyerr",
23 23 "traceback": [
24 24 "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[1;31mZeroDivisionError\u001b[0m Traceback (most recent call last)",
25 25 "\u001b[1;32m<ipython-input-1-b710d87c980c>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[1;36m1\u001b[0m \u001b[1;33m/\u001b[0m \u001b[1;36m0\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
26 26 "\u001b[1;31mZeroDivisionError\u001b[0m: integer division or modulo by zero"
27 27 ]
28 28 }
29 29 ],
30 30 "prompt_number": 1
31 31 },
32 32 {
33 33 "cell_type": "code",
34 34 "collapsed": false,
35 35 "input": [
36 "print 'ok'"
36 "print('ok')"
37 37 ],
38 38 "language": "python",
39 39 "metadata": {},
40 40 "outputs": [
41 41 {
42 42 "output_type": "stream",
43 43 "stream": "stdout",
44 44 "text": [
45 45 "ok\n"
46 46 ]
47 47 }
48 48 ],
49 49 "prompt_number": 2
50 50 }
51 51 ],
52 52 "metadata": {}
53 53 }
54 54 ]
55 55 } No newline at end of file
@@ -1,24 +1,24 b''
1 1 {
2 2 "metadata": {
3 3 "name": ""
4 4 },
5 5 "nbformat": 3,
6 6 "nbformat_minor": 0,
7 7 "worksheets": [
8 8 {
9 9 "cells": [
10 10 {
11 11 "cell_type": "code",
12 12 "collapsed": false,
13 13 "input": [
14 "print '\u2603'"
14 "print('\u2603')"
15 15 ],
16 16 "language": "python",
17 17 "metadata": {},
18 18 "outputs": []
19 19 }
20 20 ],
21 21 "metadata": {}
22 22 }
23 23 ]
24 24 } No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now