Re-run Chapter 01 files with Python 3.12
This commit is contained in:
parent
d6c8a5b8ac
commit
8da18b8677
8 changed files with 28 additions and 20 deletions
|
@ -1654,10 +1654,10 @@
|
|||
"outputs": [
|
||||
{
|
||||
"ename": "SyntaxError",
|
||||
"evalue": "invalid syntax (<ipython-input-47-cafa82e54b9c>, line 1)",
|
||||
"evalue": "invalid syntax (73631267.py, line 1)",
|
||||
"output_type": "error",
|
||||
"traceback": [
|
||||
"\u001b[0;36m File \u001b[0;32m\"<ipython-input-47-cafa82e54b9c>\"\u001b[0;36m, line \u001b[0;32m1\u001b[0m\n\u001b[0;31m 3.99 $ + 10.40 $\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n"
|
||||
"\u001b[0;36m Cell \u001b[0;32mIn[47], line 1\u001b[0;36m\u001b[0m\n\u001b[0;31m 3.99 $ + 10.40 $\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -1687,10 +1687,10 @@
|
|||
"outputs": [
|
||||
{
|
||||
"ename": "SyntaxError",
|
||||
"evalue": "invalid syntax (<ipython-input-48-499e4d0d0cbb>, line 1)",
|
||||
"evalue": "expected ':' (2545637715.py, line 1)",
|
||||
"output_type": "error",
|
||||
"traceback": [
|
||||
"\u001b[0;36m File \u001b[0;32m\"<ipython-input-48-499e4d0d0cbb>\"\u001b[0;36m, line \u001b[0;32m1\u001b[0m\n\u001b[0;31m for number in numbers\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n"
|
||||
"\u001b[0;36m Cell \u001b[0;32mIn[48], line 1\u001b[0;36m\u001b[0m\n\u001b[0;31m for number in numbers\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m expected ':'\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -1721,10 +1721,10 @@
|
|||
"outputs": [
|
||||
{
|
||||
"ename": "IndentationError",
|
||||
"evalue": "expected an indented block (<ipython-input-49-19398c5f89de>, line 2)",
|
||||
"evalue": "expected an indented block after 'for' statement on line 1 (1544118965.py, line 2)",
|
||||
"output_type": "error",
|
||||
"traceback": [
|
||||
"\u001b[0;36m File \u001b[0;32m\"<ipython-input-49-19398c5f89de>\"\u001b[0;36m, line \u001b[0;32m2\u001b[0m\n\u001b[0;31m print(number)\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mIndentationError\u001b[0m\u001b[0;31m:\u001b[0m expected an indented block\n"
|
||||
"\u001b[0;36m Cell \u001b[0;32mIn[49], line 2\u001b[0;36m\u001b[0m\n\u001b[0;31m print(number)\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mIndentationError\u001b[0m\u001b[0;31m:\u001b[0m expected an indented block after 'for' statement on line 1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -1775,7 +1775,7 @@
|
|||
"traceback": [
|
||||
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
||||
"\u001b[0;31mZeroDivisionError\u001b[0m Traceback (most recent call last)",
|
||||
"\u001b[0;32m<ipython-input-50-bc757c3fda29>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;36m1\u001b[0m \u001b[0;34m/\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
|
||||
"Cell \u001b[0;32mIn[50], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;241;43m1\u001b[39;49m\u001b[43m \u001b[49m\u001b[38;5;241;43m/\u001b[39;49m\u001b[43m \u001b[49m\u001b[38;5;241;43m0\u001b[39;49m\n",
|
||||
"\u001b[0;31mZeroDivisionError\u001b[0m: division by zero"
|
||||
]
|
||||
}
|
||||
|
@ -2156,7 +2156,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.6"
|
||||
"version": "3.12.2"
|
||||
},
|
||||
"livereveal": {
|
||||
"auto_select": "code",
|
||||
|
|
|
@ -151,7 +151,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.6"
|
||||
"version": "3.12.2"
|
||||
},
|
||||
"toc": {
|
||||
"base_numbering": 1,
|
||||
|
|
|
@ -197,7 +197,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.6"
|
||||
"version": "3.12.2"
|
||||
},
|
||||
"toc": {
|
||||
"base_numbering": 1,
|
||||
|
|
|
@ -350,7 +350,7 @@
|
|||
"traceback": [
|
||||
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
||||
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
|
||||
"\u001b[0;32m<ipython-input-13-1748287bc46a>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mvariable\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
|
||||
"Cell \u001b[0;32mIn[13], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mvariable\u001b[49m\n",
|
||||
"\u001b[0;31mNameError\u001b[0m: name 'variable' is not defined"
|
||||
]
|
||||
}
|
||||
|
@ -419,6 +419,7 @@
|
|||
"text/plain": [
|
||||
"['In',\n",
|
||||
" 'Out',\n",
|
||||
" 'Path',\n",
|
||||
" '_',\n",
|
||||
" '_10',\n",
|
||||
" '_11',\n",
|
||||
|
@ -435,6 +436,7 @@
|
|||
" '__loader__',\n",
|
||||
" '__name__',\n",
|
||||
" '__package__',\n",
|
||||
" '__session__',\n",
|
||||
" '__spec__',\n",
|
||||
" '_dh',\n",
|
||||
" '_i',\n",
|
||||
|
@ -457,11 +459,17 @@
|
|||
" '_ii',\n",
|
||||
" '_iii',\n",
|
||||
" '_oh',\n",
|
||||
" 'atexit',\n",
|
||||
" 'exit',\n",
|
||||
" 'get_ipython',\n",
|
||||
" 'history',\n",
|
||||
" 'history_path',\n",
|
||||
" 'open',\n",
|
||||
" 'os',\n",
|
||||
" 'quit',\n",
|
||||
" 'register_readline_completion',\n",
|
||||
" 'sys']"
|
||||
" 'readline',\n",
|
||||
" 'state_home',\n",
|
||||
" 'write_history']"
|
||||
]
|
||||
},
|
||||
"execution_count": 15,
|
||||
|
@ -636,10 +644,10 @@
|
|||
"outputs": [
|
||||
{
|
||||
"ename": "SyntaxError",
|
||||
"evalue": "cannot assign to operator (<ipython-input-23-ec51dae29567>, line 1)",
|
||||
"evalue": "cannot assign to expression here. Maybe you meant '==' instead of '='? (202417111.py, line 1)",
|
||||
"output_type": "error",
|
||||
"traceback": [
|
||||
"\u001b[0;36m File \u001b[0;32m\"<ipython-input-23-ec51dae29567>\"\u001b[0;36m, line \u001b[0;32m1\u001b[0m\n\u001b[0;31m address@work = \"WHU, Burgplatz 2, Vallendar\"\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m cannot assign to operator\n"
|
||||
"\u001b[0;36m Cell \u001b[0;32mIn[23], line 1\u001b[0;36m\u001b[0m\n\u001b[0;31m address@work = \"WHU, Burgplatz 2, Vallendar\"\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m cannot assign to expression here. Maybe you meant '==' instead of '='?\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -1685,7 +1693,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.6"
|
||||
"version": "3.12.2"
|
||||
},
|
||||
"livereveal": {
|
||||
"auto_select": "code",
|
||||
|
|
|
@ -191,7 +191,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.6"
|
||||
"version": "3.12.2"
|
||||
},
|
||||
"toc": {
|
||||
"base_numbering": 1,
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.6"
|
||||
"version": "3.12.2"
|
||||
},
|
||||
"livereveal": {
|
||||
"auto_select": "code",
|
||||
|
|
|
@ -194,7 +194,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.6"
|
||||
"version": "3.12.2"
|
||||
},
|
||||
"toc": {
|
||||
"base_numbering": 1,
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.6"
|
||||
"version": "3.12.2"
|
||||
},
|
||||
"livereveal": {
|
||||
"auto_select": "code",
|
||||
|
|
Loading…
Reference in a new issue