{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Modules\n", "\n", "How to import modules" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "1.0\n" ] } ], "source": [ "import math\n", "n = input()\n", "\n", "def caccolo(n):\n", " x,y = (math.sin(float(n)))**2, (math.cos(float(n)))**2\n", " res = x+y\n", " print(res)\n", "\n", "caccolo(n)" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.479425538604203" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import math as cazzoprovolone\n", "\n", "cazzoprovolone.sin(0.5)" ] } ], "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.12.7" } }, "nbformat": 4, "nbformat_minor": 2 }