{ "cells": [ { "cell_type": "markdown", "id": "intro", "metadata": {}, "source": [ "# Debug a cell\n", "\n", "Set a breakpoint in `double`, then choose **Debug Cell** on the last cell." ] }, { "cell_type": "code", "execution_count": null, "id": "helper", "metadata": {}, "outputs": [], "source": [ "def double(x):\n", " y = x * 2\n", " return y" ] }, { "cell_type": "code", "execution_count": null, "id": "loop", "metadata": {}, "outputs": [], "source": [ "total = 0\n", "for n in range(3):\n", " total += double(n)\n", "print(total)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 5 }