Skip to content

Commit

Permalink
Mit Colab erstellt
Browse files Browse the repository at this point in the history
  • Loading branch information
soberbichler committed Oct 24, 2024
1 parent df57cad commit aa470c6
Showing 1 changed file with 51 additions and 9 deletions.
60 changes: 51 additions & 9 deletions Python_CrashCourse_1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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": []
Expand Down Expand Up @@ -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": {
Expand All @@ -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",
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit aa470c6

Please sign in to comment.