From 02a4500fcf3d8651e9cb90d5244dd225754f3416 Mon Sep 17 00:00:00 2001 From: Rochavnuno <53574650+Rochavnuno@users.noreply.github.com> Date: Thu, 26 Feb 2026 20:09:19 +0000 Subject: [PATCH 1/9] Update debug_exercise_01.ipynb --- .../debug_exercise_01.ipynb | 64 +++++++++++++------ 1 file changed, 43 insertions(+), 21 deletions(-) diff --git a/python-debug-lab-20260129/debug_exercise_01.ipynb b/python-debug-lab-20260129/debug_exercise_01.ipynb index 5f18677..e22ee62 100644 --- a/python-debug-lab-20260129/debug_exercise_01.ipynb +++ b/python-debug-lab-20260129/debug_exercise_01.ipynb @@ -1,39 +1,61 @@ { - "nbformat": 4, - "nbformat_minor": 0, - "metadata": { - "colab": { - "provenance": [] - }, - "kernelspec": { - "name": "python3", - "display_name": "Python 3" - }, - "language_info": { - "name": "python" - } - }, "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": { "id": "JAxCEAYjWUfd" }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Olá Nuno\n", + "Tens 56 anos \n", + "Pesas 77 kg\n", + "Olá Nuno, tens 56 anos e pesas 77kg\n", + "Programa terminado\n" + ] + } + ], "source": [ - "Este programa pergunta dados do utilizador.\n", + "##Este programa pergunta dados do utilizador.\n", "\n", "nome = input(\"Qual é o teu nome?\")\n", "idade = input(\"Qual é a tua idade?\")\n", "peso = input(\"Qual é o teu peso em kg?\")\n", "\n", - "print(\"Olá \" + nome # Converter todos os prints para f-string\n", + "print(\"Olá \" + nome) # Converter todos os prints para f-string\n", "print(\"Tens \" + idade + \" anos \")\n", "print(\"Pesas \" + peso + \" kg\")\n", "\n", - "pritn(\"Programa terminado\")" + "print(f\"Olá {nome}, tens {idade} anos e pesas {peso}kg\")\n", + "print(\"Programa terminado\")" ] } - ] -} \ No newline at end of file + ], + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "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.13.12" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} From f0a6985e438956cba9681266d9f47e5bafb41eef Mon Sep 17 00:00:00 2001 From: Rochavnuno <53574650+Rochavnuno@users.noreply.github.com> Date: Thu, 26 Feb 2026 20:15:35 +0000 Subject: [PATCH 2/9] Update debug_exercise_01.ipynb --- .../debug_exercise_01.ipynb | 46 +++++++++++++++---- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/python-debug-lab-20260129/debug_exercise_01.ipynb b/python-debug-lab-20260129/debug_exercise_01.ipynb index e22ee62..e1239a6 100644 --- a/python-debug-lab-20260129/debug_exercise_01.ipynb +++ b/python-debug-lab-20260129/debug_exercise_01.ipynb @@ -1,8 +1,15 @@ { "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Este programa pergunta dados do utilizador." + ] + }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 1, "metadata": { "id": "JAxCEAYjWUfd" }, @@ -11,25 +18,44 @@ "name": "stdout", "output_type": "stream", "text": [ - "Olá Nuno\n", + "Olá Nuno Rocha\n", "Tens 56 anos \n", - "Pesas 77 kg\n", - "Olá Nuno, tens 56 anos e pesas 77kg\n", - "Programa terminado\n" + "Pesas 77 kg\n" ] } ], "source": [ - "##Este programa pergunta dados do utilizador.\n", - "\n", "nome = input(\"Qual é o teu nome?\")\n", "idade = input(\"Qual é a tua idade?\")\n", "peso = input(\"Qual é o teu peso em kg?\")\n", "\n", - "print(\"Olá \" + nome) # Converter todos os prints para f-string\n", + "print(\"Olá \" + nome) \n", "print(\"Tens \" + idade + \" anos \")\n", - "print(\"Pesas \" + peso + \" kg\")\n", - "\n", + "print(\"Pesas \" + peso + \" kg\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Converter todos os prints para f-string" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Olá Nuno Rocha, tens 56 anos e pesas 77kg\n", + "Programa terminado\n" + ] + } + ], + "source": [ "print(f\"Olá {nome}, tens {idade} anos e pesas {peso}kg\")\n", "print(\"Programa terminado\")" ] From 7740d11d64a65b3f5d806bcd701187999ee8ed4b Mon Sep 17 00:00:00 2001 From: Rochavnuno <53574650+Rochavnuno@users.noreply.github.com> Date: Thu, 26 Feb 2026 20:18:09 +0000 Subject: [PATCH 3/9] Update debug_exercise_01.ipynb --- python-debug-lab-20260129/debug_exercise_01.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-debug-lab-20260129/debug_exercise_01.ipynb b/python-debug-lab-20260129/debug_exercise_01.ipynb index e1239a6..3d3edf3 100644 --- a/python-debug-lab-20260129/debug_exercise_01.ipynb +++ b/python-debug-lab-20260129/debug_exercise_01.ipynb @@ -19,7 +19,7 @@ "output_type": "stream", "text": [ "Olá Nuno Rocha\n", - "Tens 56 anos \n", + "Tens 55 anos \n", "Pesas 77 kg\n" ] } @@ -50,7 +50,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Olá Nuno Rocha, tens 56 anos e pesas 77kg\n", + "Olá Nuno Rocha, tens 55 anos e pesas 77kg\n", "Programa terminado\n" ] } From 17582ad169b9c3da07e9d9aace29ce9130bc75f2 Mon Sep 17 00:00:00 2001 From: Rochavnuno <53574650+Rochavnuno@users.noreply.github.com> Date: Thu, 26 Feb 2026 21:04:33 +0000 Subject: [PATCH 4/9] Update debug_exercise_01.ipynb --- python-debug-lab-20260129/debug_exercise_01.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python-debug-lab-20260129/debug_exercise_01.ipynb b/python-debug-lab-20260129/debug_exercise_01.ipynb index 3d3edf3..ba43952 100644 --- a/python-debug-lab-20260129/debug_exercise_01.ipynb +++ b/python-debug-lab-20260129/debug_exercise_01.ipynb @@ -9,7 +9,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 4, "metadata": { "id": "JAxCEAYjWUfd" }, @@ -19,7 +19,7 @@ "output_type": "stream", "text": [ "Olá Nuno Rocha\n", - "Tens 55 anos \n", + "Tens 56 anos \n", "Pesas 77 kg\n" ] } @@ -43,14 +43,14 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Olá Nuno Rocha, tens 55 anos e pesas 77kg\n", + "Olá Nuno Rocha, tens 56 anos e pesas 77kg\n", "Programa terminado\n" ] } From 8903bfa8a25a6d59cfd3135a687afe8032a30a70 Mon Sep 17 00:00:00 2001 From: Rochavnuno <53574650+Rochavnuno@users.noreply.github.com> Date: Thu, 26 Feb 2026 21:56:06 +0000 Subject: [PATCH 5/9] =?UTF-8?q?Criado=20atrav=C3=A9s=20do=20Colab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../debug_exercise_01.ipynb | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/python-debug-lab-20260129/debug_exercise_01.ipynb b/python-debug-lab-20260129/debug_exercise_01.ipynb index ba43952..d6f87a4 100644 --- a/python-debug-lab-20260129/debug_exercise_01.ipynb +++ b/python-debug-lab-20260129/debug_exercise_01.ipynb @@ -2,16 +2,19 @@ "cells": [ { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "id": "l94GSb7b5_B1" + }, "source": [ "## Este programa pergunta dados do utilizador." ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": { - "id": "JAxCEAYjWUfd" + "id": "JAxCEAYjWUfd", + "outputId": "cfec266a-9eb2-4ecb-81bb-74249cc74cf9" }, "outputs": [ { @@ -29,22 +32,27 @@ "idade = input(\"Qual é a tua idade?\")\n", "peso = input(\"Qual é o teu peso em kg?\")\n", "\n", - "print(\"Olá \" + nome) \n", + "print(\"Olá \" + nome)\n", "print(\"Tens \" + idade + \" anos \")\n", "print(\"Pesas \" + peso + \" kg\")" ] }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "id": "Ae1jOWeW5_B3" + }, "source": [ "## Converter todos os prints para f-string" ] }, { "cell_type": "code", - "execution_count": 5, - "metadata": {}, + "execution_count": null, + "metadata": { + "id": "Cb_LKzXi5_B3", + "outputId": "836e8694-eb5b-4459-d54e-70659ebe600a" + }, "outputs": [ { "name": "stdout", @@ -84,4 +92,4 @@ }, "nbformat": 4, "nbformat_minor": 0 -} +} \ No newline at end of file From 1e6a53acb4754e18478fb19fab948615755a90ee Mon Sep 17 00:00:00 2001 From: Rochavnuno <53574650+Rochavnuno@users.noreply.github.com> Date: Thu, 26 Feb 2026 22:12:51 +0000 Subject: [PATCH 6/9] =?UTF-8?q?Criado=20atrav=C3=A9s=20do=20Colab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../debug_exercise_01.ipynb | 47 +++++++++++++------ 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/python-debug-lab-20260129/debug_exercise_01.ipynb b/python-debug-lab-20260129/debug_exercise_01.ipynb index d6f87a4..703c5f6 100644 --- a/python-debug-lab-20260129/debug_exercise_01.ipynb +++ b/python-debug-lab-20260129/debug_exercise_01.ipynb @@ -11,30 +11,36 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": { "id": "JAxCEAYjWUfd", - "outputId": "cfec266a-9eb2-4ecb-81bb-74249cc74cf9" + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "9811f26b-d94e-4c8f-eea4-caf3c3746e4f" }, "outputs": [ { - "name": "stdout", "output_type": "stream", + "name": "stdout", "text": [ + "Qual é o teu nome?Nuno Rocha\n", + "Qual é a tua idade?55\n", + "Qual é o teu peso em kg?76.50\n", "Olá Nuno Rocha\n", - "Tens 56 anos \n", - "Pesas 77 kg\n" + "Tens 55 anos \n", + "Pesas 76.5 kg\n" ] } ], "source": [ "nome = input(\"Qual é o teu nome?\")\n", - "idade = input(\"Qual é a tua idade?\")\n", - "peso = input(\"Qual é o teu peso em kg?\")\n", + "idade = int(input(\"Qual é a tua idade?\"))\n", + "peso = float(input(\"Qual é o teu peso em kg?\"))\n", "\n", - "print(\"Olá \" + nome)\n", - "print(\"Tens \" + idade + \" anos \")\n", - "print(\"Pesas \" + peso + \" kg\")" + "print(f\"Olá {nome}\")\n", + "print(f\"Tens {idade} anos \")\n", + "print(f\"Pesas {peso} kg\")" ] }, { @@ -48,17 +54,20 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, "id": "Cb_LKzXi5_B3", - "outputId": "836e8694-eb5b-4459-d54e-70659ebe600a" + "outputId": "33ca1eab-713c-46b2-a4f5-d57ac123cb41" }, "outputs": [ { - "name": "stdout", "output_type": "stream", + "name": "stdout", "text": [ - "Olá Nuno Rocha, tens 56 anos e pesas 77kg\n", + "Olá Nuno Rocha, tens 55 anos e pesas 76.5kg\n", "Programa terminado\n" ] } @@ -67,11 +76,19 @@ "print(f\"Olá {nome}, tens {idade} anos e pesas {peso}kg\")\n", "print(\"Programa terminado\")" ] + }, + { + "cell_type": "markdown", + "source": [], + "metadata": { + "id": "UhQp9c29AmiN" + } } ], "metadata": { "colab": { - "provenance": [] + "provenance": [], + "history_visible": true }, "kernelspec": { "display_name": "Python 3", From 046c3ffd1d058ffc9f60810f0f277093766bf659 Mon Sep 17 00:00:00 2001 From: Rochavnuno <53574650+Rochavnuno@users.noreply.github.com> Date: Fri, 27 Feb 2026 20:09:32 +0000 Subject: [PATCH 7/9] =?UTF-8?q?Criado=20atrav=C3=A9s=20do=20Colab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../debug_exercise_01.ipynb | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/python-debug-lab-20260129/debug_exercise_01.ipynb b/python-debug-lab-20260129/debug_exercise_01.ipynb index 703c5f6..86fdf00 100644 --- a/python-debug-lab-20260129/debug_exercise_01.ipynb +++ b/python-debug-lab-20260129/debug_exercise_01.ipynb @@ -11,33 +11,35 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 1, "metadata": { "id": "JAxCEAYjWUfd", "colab": { "base_uri": "https://localhost:8080/" }, - "outputId": "9811f26b-d94e-4c8f-eea4-caf3c3746e4f" + "outputId": "cc9c74dc-a603-4d1f-83a0-84f67439a8ec" }, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ - "Qual é o teu nome?Nuno Rocha\n", - "Qual é a tua idade?55\n", - "Qual é o teu peso em kg?76.50\n", + "Qual é o teu nome? Nuno Rocha\n", + "Qual é a tua idade? 55\n", + "Qual é o teu peso em kg? 77.50\n", + "\n", + "\n", "Olá Nuno Rocha\n", "Tens 55 anos \n", - "Pesas 76.5 kg\n" + "Pesas 77.5 kg\n" ] } ], "source": [ - "nome = input(\"Qual é o teu nome?\")\n", - "idade = int(input(\"Qual é a tua idade?\"))\n", - "peso = float(input(\"Qual é o teu peso em kg?\"))\n", - "\n", + "nome = input(\"Qual é o teu nome? \")\n", + "idade = int(input(\"Qual é a tua idade? \"))\n", + "peso = float(input(\"Qual é o teu peso em kg? \"))\n", + "print(\"\\n\")\n", "print(f\"Olá {nome}\")\n", "print(f\"Tens {idade} anos \")\n", "print(f\"Pesas {peso} kg\")" @@ -54,26 +56,29 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 4, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "Cb_LKzXi5_B3", - "outputId": "33ca1eab-713c-46b2-a4f5-d57ac123cb41" + "outputId": "2cf5dd18-06ea-4c81-eb67-5b818e39075b" }, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ - "Olá Nuno Rocha, tens 55 anos e pesas 76.5kg\n", + "Olá Nuno Rocha, tens 55 anos e pesas 77.5kg\n", + "\n", + "\n", "Programa terminado\n" ] } ], "source": [ "print(f\"Olá {nome}, tens {idade} anos e pesas {peso}kg\")\n", + "print(\"\\n\")\n", "print(\"Programa terminado\")" ] }, @@ -87,8 +92,7 @@ ], "metadata": { "colab": { - "provenance": [], - "history_visible": true + "provenance": [] }, "kernelspec": { "display_name": "Python 3", From 8e805597d60d4c5c68cc0100bbdad2a4aaa1803a Mon Sep 17 00:00:00 2001 From: Rochavnuno <53574650+Rochavnuno@users.noreply.github.com> Date: Fri, 27 Feb 2026 21:06:03 +0000 Subject: [PATCH 8/9] =?UTF-8?q?Criado=20atrav=C3=A9s=20do=20Colab=20por=20?= =?UTF-8?q?Nuno=20Rocha?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From bf8af285accb8aecb40a2c538d789ef0bf08b9da Mon Sep 17 00:00:00 2001 From: Rochavnuno <53574650+Rochavnuno@users.noreply.github.com> Date: Fri, 27 Feb 2026 21:16:51 +0000 Subject: [PATCH 9/9] Update debug_exercise_01.ipynb --- python-debug-lab-20260129/debug_exercise_01.ipynb | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/python-debug-lab-20260129/debug_exercise_01.ipynb b/python-debug-lab-20260129/debug_exercise_01.ipynb index 86fdf00..9989fe3 100644 --- a/python-debug-lab-20260129/debug_exercise_01.ipynb +++ b/python-debug-lab-20260129/debug_exercise_01.ipynb @@ -13,16 +13,16 @@ "cell_type": "code", "execution_count": 1, "metadata": { - "id": "JAxCEAYjWUfd", "colab": { "base_uri": "https://localhost:8080/" }, + "id": "JAxCEAYjWUfd", "outputId": "cc9c74dc-a603-4d1f-83a0-84f67439a8ec" }, "outputs": [ { - "output_type": "stream", "name": "stdout", + "output_type": "stream", "text": [ "Qual é o teu nome? Nuno Rocha\n", "Qual é a tua idade? 55\n", @@ -66,8 +66,8 @@ }, "outputs": [ { - "output_type": "stream", "name": "stdout", + "output_type": "stream", "text": [ "Olá Nuno Rocha, tens 55 anos e pesas 77.5kg\n", "\n", @@ -81,13 +81,6 @@ "print(\"\\n\")\n", "print(\"Programa terminado\")" ] - }, - { - "cell_type": "markdown", - "source": [], - "metadata": { - "id": "UhQp9c29AmiN" - } } ], "metadata": { @@ -113,4 +106,4 @@ }, "nbformat": 4, "nbformat_minor": 0 -} \ No newline at end of file +}