{ "metadata": { "kernelspec": { "name": "python", "display_name": "Python (Pyodide)", "language": "python" }, "language_info": { "codemirror_mode": { "name": "python", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8" } }, "nbformat_minor": 4, "nbformat": 4, "cells": [ { "cell_type": "markdown", "source": "Here we have just a slightly more sophisticated version of the prog. We are using variables, but still copying the formula for every variable. We'll show a better way to do that in a second.", "metadata": {} }, { "cell_type": "code", "source": "x=12345 \ny=56789\n\n128*(x-10000)", "metadata": { "trusted": true }, "outputs": [ { "execution_count": 3, "output_type": "execute_result", "data": { "text/plain": "300160" }, "metadata": {} } ], "execution_count": 3 }, { "cell_type": "code", "source": "128*(y-10000)", "metadata": { "trusted": true }, "outputs": [ { "execution_count": 4, "output_type": "execute_result", "data": { "text/plain": "5988992" }, "metadata": {} } ], "execution_count": 4 }, { "cell_type": "code", "source": "", "metadata": { "trusted": true }, "outputs": [], "execution_count": null } ] }