{ "cells": [ { "cell_type": "code", "execution_count": 14, "id": "82767963-1f9f-4de1-bef7-fa2f82335393", "metadata": {}, "outputs": [ { "ename": "SyntaxError", "evalue": "invalid syntax (879943805.py, line 1)", "output_type": "error", "traceback": [ " \u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[14]\u001b[39m\u001b[32m, line 1\u001b[39m\n\u001b[31m \u001b[39m\u001b[31mif:\u001b[39m\n ^\n\u001b[31mSyntaxError\u001b[39m\u001b[31m:\u001b[39m invalid syntax\n" ] } ], "source": [ "if:" ] }, { "cell_type": "code", "execution_count": 1, "id": "4625e549-c17f-4e3d-a867-a967f1ea01c9", "metadata": {}, "outputs": [ { "ename": "NameError", "evalue": "name 'foobar' is not defined", "output_type": "error", "traceback": [ "\u001b[31m---------------------------------------------------------------------------\u001b[39m", "\u001b[31mNameError\u001b[39m Traceback (most recent call last)", "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[1]\u001b[39m\u001b[32m, line 1\u001b[39m\n\u001b[32m----> \u001b[39m\u001b[32m1\u001b[39m \u001b[43mfoobar\u001b[49m\n", "\u001b[31mNameError\u001b[39m: name 'foobar' is not defined" ] } ], "source": [ "foobar" ] }, { "cell_type": "code", "execution_count": 12, "id": "2271b9b0-cd10-41e8-a262-5b1a20572839", "metadata": {}, "outputs": [ { "ename": "TypeError", "evalue": "'int' object is not iterable", "output_type": "error", "traceback": [ "\u001b[31m---------------------------------------------------------------------------\u001b[39m", "\u001b[31mTypeError\u001b[39m Traceback (most recent call last)", "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[12]\u001b[39m\u001b[32m, line 1\u001b[39m\n\u001b[32m----> \u001b[39m\u001b[32m1\u001b[39m \u001b[38;5;28;43mlist\u001b[39;49m\u001b[43m(\u001b[49m\u001b[32;43m123\u001b[39;49m\u001b[43m)\u001b[49m\n", "\u001b[31mTypeError\u001b[39m: 'int' object is not iterable" ] } ], "source": [ "list(123)" ] }, { "cell_type": "code", "execution_count": 13, "id": "eb9ec449-59a1-44fd-9c6a-b4c091036ef4", "metadata": {}, "outputs": [ { "ename": "ValueError", "evalue": "some error", "output_type": "error", "traceback": [ "\u001b[31m---------------------------------------------------------------------------\u001b[39m", "\u001b[31mValueError\u001b[39m Traceback (most recent call last)", "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[13]\u001b[39m\u001b[32m, line 1\u001b[39m\n\u001b[32m----> \u001b[39m\u001b[32m1\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\u001b[33m\"\u001b[39m\u001b[33msome error\u001b[39m\u001b[33m\"\u001b[39m)\n", "\u001b[31mValueError\u001b[39m: some error" ] } ], "source": [ "raise ValueError(\"some error\")" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.5" } }, "nbformat": 4, "nbformat_minor": 5 }