diff --git a/Ovingsforelesninger/felles/lecture2.ipynb b/Ovingsforelesninger/felles/lecture2.ipynb index 10f701b34a9206490e9bfa606c789bf0f0c13306..e7bc5efee7b6d698c13cc6fb6b4307b5662a3893 100644 --- a/Ovingsforelesninger/felles/lecture2.ipynb +++ b/Ovingsforelesninger/felles/lecture2.ipynb @@ -5,7 +5,7 @@ "kernelspec": { "display_name": "Python 3.8.3 64-bit", "language": "python", - "name": "python_defaultSpec_1599133712327" + "name": "python_defaultSpec_1599212173932" }, "language_info": { "codemirror_mode": { @@ -60,16 +60,10 @@ "tags": [] }, "source": [ - "print(2**7%42)" + "#Skriv kode her" ], - "execution_count": 4, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": "2\n" - } - ] + "execution_count": 6, + "outputs": [] }, { "cell_type": "markdown", @@ -102,12 +96,9 @@ "colab": {} }, "source": [ - "tall1 = int(input('Tall 1: '))\n", - "tall2 = int(input('Tall 2: '))\n", - "resultat = tall1 * tall2\n", - "print(tall1, '*', tall2, '=', resultat)\n" + "#Skriv kode her\n" ], - "execution_count": 22, + "execution_count": 5, "outputs": [] }, { @@ -141,11 +132,9 @@ "colab": {} }, "source": [ - "tall1 = float(input('Tall 1: '))\n", - "tall2 = float(input('Tall 2: '))\n", - "print(abs(tall1-tall2))\n" + "#Skriv kode her\n" ], - "execution_count": 22, + "execution_count": 3, "outputs": [] }, { @@ -216,17 +205,10 @@ "tags": [] }, "source": [ - "import math\n", - "print(round(math.pi,10))" + "#Skriv kode her" ], - "execution_count": 18, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": "3.1415926536\n" - } - ] + "execution_count": 1, + "outputs": [] }, { "cell_type": "markdown", @@ -263,20 +245,10 @@ "tags": [] }, "source": [ - "PI = 3.14\n", - "r = 3\n", - "h = 7\n", - "V = (PI*r**2*h)/3\n", - "print(V)" + "#Skriv kode her" ], - "execution_count": 19, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": "65.94000000000001\n" - } - ] + "execution_count": 2, + "outputs": [] }, { "cell_type": "markdown", @@ -307,13 +279,9 @@ "colab": {} }, "source": [ - "PI = 3.14\n", - "r = float(input('Radius: '))\n", - "h = float(input('Høyde: '))\n", - "V = (PI*r**2*h)/3\n", - "print(V)" + "#Skriv kode her" ], - "execution_count": 21, + "execution_count": 8, "outputs": [] } ]