{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "fd5b1a83-7212-4aca-b317-991bf289fba8", "metadata": {}, "outputs": [], "source": [ "def add(a, b):\n", " return a + b" ] }, { "cell_type": "code", "execution_count": 2, "id": "4d842395-3e17-48e8-b613-9856365e9796", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "11" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "add(5, 6)" ] }, { "cell_type": "code", "execution_count": 3, "id": "f2afc967-a66a-4a47-bfc5-0d6c17826794", "metadata": {}, "outputs": [ { "ename": "ZeroDivisionError", "evalue": "division by zero", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mZeroDivisionError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m<ipython-input-3-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[0m\n\u001b[0m", "\u001b[0;31mZeroDivisionError\u001b[0m: division by zero" ] } ], "source": [ "1 / 0" ] }, { "cell_type": "markdown", "id": "8491b29d-375d-458f-8a46-fc822422d8f3", "metadata": {}, "source": [ "hello" ] }, { "cell_type": "code", "execution_count": null, "id": "601a89e6-5ca6-4725-8834-5e975ba76726", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.6.4" } }, "nbformat": 4, "nbformat_minor": 5 }