From 75000569cb4d47aeab6a4f440323f177bb0a196d Mon Sep 17 00:00:00 2001 From: Rodrigo Mendes Date: Thu, 11 Sep 2025 18:19:49 +0100 Subject: [PATCH 1/3] Add test.txt as initial file --- test.txt | Bin 0 -> 16 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test.txt diff --git a/test.txt b/test.txt new file mode 100644 index 0000000000000000000000000000000000000000..ea2355e2a67210ea365c12374146bc8c4883241c GIT binary patch literal 16 VcmezW&x0YAAqNQa8F(4E7yvQ|1PK5D literal 0 HcmV?d00001 From 60118959a506712abe87f3aa01cf6c303406ffea Mon Sep 17 00:00:00 2001 From: Rodrigo Mendes Date: Sat, 13 Sep 2025 11:49:56 +0100 Subject: [PATCH 2/3] Add initial project files --- your-code/main.ipynb | 63 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 52 insertions(+), 11 deletions(-) diff --git a/your-code/main.ipynb b/your-code/main.ipynb index de27676..45f22f9 100644 --- a/your-code/main.ipynb +++ b/your-code/main.ipynb @@ -13,7 +13,7 @@ "metadata": {}, "outputs": [], "source": [ - "words = ['play', 'filling', 'bar', 'theatre', 'easygoing', 'date', 'lead', 'that', 'story', 'island']" + "words = ['play', 'filling', 'bar', 'theatre', 'easygoing', 'date', 'lead', 'that', 'story', 'island', 'guitar', 'swing', 'broad', 'soup', 'singer', 'sugar', 'sail', 'shelf', 'sudden', 'cable', 'dare']" ] }, { @@ -29,7 +29,12 @@ "metadata": {}, "outputs": [], "source": [ - "# your code here" + "words = ['play', 'filling', 'bar', 'theatre', 'easygoing', 'date', 'lead', 'that', \n", + " 'story', 'island', 'guitar', 'swing', 'broad', 'soup', 'singer', 'sugar', \n", + " 'sail', 'shelf', 'sudden', 'cable', 'dare']\n", + "\n", + "for word in words:\n", + " print(word.upper())" ] }, { @@ -45,7 +50,13 @@ "metadata": {}, "outputs": [], "source": [ - "# your code here" + "words = ['play', 'filling', 'bar', 'theatre', 'easygoing', 'date', 'lead', 'that', \n", + " 'story', 'island', 'guitar', 'swing', 'broad', 'soup', 'singer', 'sugar', \n", + " 'sail', 'shelf', 'sudden', 'cable', 'dare']\n", + "\n", + "long_words = [word for word in words if len(word) >= 5]\n", + "\n", + "print(long_words)" ] }, { @@ -61,7 +72,14 @@ "metadata": {}, "outputs": [], "source": [ - "# your code here" + "words = ['play', 'filling', 'bar', 'theatre', 'easygoing', 'date', 'lead', 'that', \n", + " 'story', 'island', 'guitar', 'swing', 'broad', 'soup', 'singer', 'sugar', \n", + " 'sail', 'shelf', 'sudden', 'cable', 'dare']\n", + "\n", + "for word in words:\n", + " if word.startswith(\"t\"):\n", + " print(word)\n", + " break\n" ] }, { @@ -84,7 +102,8 @@ "metadata": {}, "outputs": [], "source": [ - "# your code here" + "squares = [n**2 for n in range(1, 11)]\n", + "print(squares)" ] }, { @@ -100,7 +119,8 @@ "metadata": {}, "outputs": [], "source": [ - "# your code here" + "squares_of_multiples = [n**2 for n in range(8, 1000, 8)]\n", + "print(squares_of_multiples)" ] }, { @@ -116,7 +136,8 @@ "metadata": {}, "outputs": [], "source": [ - "# your code here" + "squares_of_multiples = [n**2 for n in range(8, 1000, 8)]\n", + "print(squares_of_multiples)" ] }, { @@ -174,7 +195,16 @@ "metadata": {}, "outputs": [], "source": [ - "# your code here" + "people = [\n", + " {\"name\": \"Juan\", \"age\": 34, \"n_kids\": 2},\n", + " {\"name\": \"Pepe\", \"age\": 27, \"n_kids\": 0},\n", + " {\"name\": \"Sonia\", \"age\": 41, \"n_kids\": 1},\n", + " {\"name\": \"LucĂ­a\", \"age\": 22, \"n_kids\": 2},\n", + " {\"name\": \"Leo\", \"age\": 55, \"n_kids\": 5}\n", + "]\n", + "\n", + "num_people = len(people)\n", + "print(num_people)" ] }, { @@ -190,7 +220,8 @@ "metadata": {}, "outputs": [], "source": [ - "# your code here" + "people_with_kids = sum(1 for person in people if person[\"n_kids\"] > 0)\n", + "print(people_with_kids)" ] }, { @@ -206,7 +237,8 @@ "metadata": {}, "outputs": [], "source": [ - "# your code here" + "total_kids = sum(person[\"n_kids\"] for person in people)\n", + "print(total_kids)" ] }, { @@ -222,7 +254,16 @@ "metadata": {}, "outputs": [], "source": [ - "# your code here" + "people_next_year = []\n", + "\n", + "for person in people:\n", + " updated_person = person.copy() # Make a copy to avoid modifying original\n", + " updated_person[\"age\"] += 1\n", + " if person[\"name\"].endswith(\"a\"):\n", + " updated_person[\"n_kids\"] += 1\n", + " people_next_year.append(updated_person)\n", + "\n", + "print(people_next_year)" ] } ], From 996508d1b2cb0a82d950f94c9fea306db5359f0b Mon Sep 17 00:00:00 2001 From: Rodrigo Mendes Date: Sat, 13 Sep 2025 11:57:48 +0100 Subject: [PATCH 3/3] Small change for PR --- README.md | Bin 458 -> 508 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/README.md b/README.md index b0c84c43825980232ef30f6592f58c44f636d86e..ef5d9d62c847e41ca1b8d20e36449e06ac23a053 100644 GIT binary patch delta 141 zcmX@b{D*l$Ei*3{@5DM4F(AdItgPUfS5lOpQkq&1{EPLE@fo}&%BbN{FKt