From aa470c6a54d23da37fc7b373d4a9a737e8d28c81 Mon Sep 17 00:00:00 2001 From: Sarah Oberbichler <66369271+soberbichler@users.noreply.github.com> Date: Thu, 24 Oct 2024 14:12:44 +0200 Subject: [PATCH] Mit Colab erstellt --- Python_CrashCourse_1.ipynb | 60 ++++++++++++++++++++++++++++++++------ 1 file changed, 51 insertions(+), 9 deletions(-) diff --git a/Python_CrashCourse_1.ipynb b/Python_CrashCourse_1.ipynb index 60cde94..f8268d8 100644 --- a/Python_CrashCourse_1.ipynb +++ b/Python_CrashCourse_1.ipynb @@ -103,14 +103,39 @@ { "cell_type": "code", "source": [ - "# @markdown ##### Can you figure out what is happening here?\n", - "x = 2\n", + "# @markdown ##### Run the cell\n", + "x = 2" + ], + "metadata": { + "id": "1MgleKd3dHOC" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "# @markdown ##### Now print x\n", + "\n", + "# add your code here below:\n", + "\n" + ], + "metadata": { + "id": "y-GFAs7EXK-l" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "# @markdown ##### Can you tell what happens here?\n", "print(x * 2)\n", "print(x == x)\n", "print(x > 6)" ], "metadata": { - "id": "1MgleKd3dHOC" + "id": "iFRbU1CgXXHs" }, "execution_count": null, "outputs": [] @@ -174,9 +199,26 @@ { "cell_type": "code", "source": [ - "# @markdown ##### **Exercise 1:** Write a simpple program that calculates how many minutes there are in seven weeks. Use variables for this exercise.\n", + "# @markdown ##### **Exercise 1:** How could we solce this problem? How can we save both political parties?\n", + "\n", + "#add your code here below\n", + "\n", + "\n" + ], + "metadata": { + "id": "h3DhyNmlXnoc" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "# @markdown ##### **Exercise 2:** Write a simpple program that calculates how many minutes there are in seven weeks. Use variables for this exercise.\n", "\n", "minutes_per_hour = 60\n", + "\n", + "\n", "\n" ], "metadata": { @@ -200,7 +242,7 @@ "source": [ "# @markdown ##### Add your name to the variable \"my_name\" and run the code\n", "\n", - "my_name = ''\n", + "my_name = 'sdf'\n", "book = \"Man without Women\"\n", "author = 'Haruki Murakami'\n", "print(my_name + \" likes \" + book + \" by \" + author)\n", @@ -267,12 +309,12 @@ { "cell_type": "code", "source": [ - "# @markdown ##### **Exercise 4:** Given the following two words, can you write code that prints out the word humanities using only slicing and concatenation? (So, no quotes are allowed in your code.)\n", + "# @markdown ##### **Exercise 3:** Given the following two words, can you write code that prints out the word humanities using only slicing and concatenation? (So, no quotes are allowed in your code.)\n", "\n", "word1 = \"human\"\n", "word2 = \"opportunities\"\n", "\n", - "# insert your code here" + "# insert your code here\n" ], "metadata": { "id": "KEg-uShKjs5j" @@ -342,7 +384,7 @@ { "cell_type": "code", "source": [ - "# @markdown ##### **Exercise 1:** Now let's use the above example to list South Africa's so called *Big Five*. Find out what animals are part of the Big Five and adapt the code to this new example. Then ask, why the hippo is not part of the Big Five.\n", + "# @markdown ##### **Exercise 4:** Now let's use the above example to list South Africa's so called *Big Five*. Find out what animals are part of the Big Five and adapt the code to this new example. Then ask, why the hippo is not part of the Big Five.\n", "\n", "# add your code here below:\n", "\n", @@ -359,7 +401,7 @@ { "cell_type": "code", "source": [ - "# @markdown ##### **Exercise 2:** Creat a list of German political parties\n", + "# @markdown ##### **Exercise 5:** Creat a list of German political parties\n", "\n", "# add you code here below\n", "\n",