From e7c3aaa6abd1205e8292b76c12e2a3fd086ab7aa Mon Sep 17 00:00:00 2001 From: paulojorgeserralha-droid Date: Fri, 27 Feb 2026 19:36:28 +0000 Subject: [PATCH 1/5] =?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 | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/python-debug-lab-20260129/debug_exercise_01.ipynb b/python-debug-lab-20260129/debug_exercise_01.ipynb index 5f18677..630a55a 100644 --- a/python-debug-lab-20260129/debug_exercise_01.ipynb +++ b/python-debug-lab-20260129/debug_exercise_01.ipynb @@ -16,23 +16,41 @@ "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": { - "id": "JAxCEAYjWUfd" + "id": "JAxCEAYjWUfd", + "outputId": "22726a4c-9ff6-4c7d-c9e4-4d45cb7b6273", + "colab": { + "base_uri": "https://localhost:8080/" + } }, - "outputs": [], + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Qual é o teu nome?Paulo\n", + "Qual é a tua idade?40\n", + "Qual é o teu peso em kg?70\n", + "Olá Paulo\n", + "Tens 40 anos \n", + "Pesas 70 kg\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(\"Programa terminado\")" ] } ] From f30b90823d4e46f75a2baf5ab3c5ff893b4b7b11 Mon Sep 17 00:00:00 2001 From: paulojorgeserralha-droid Date: Fri, 27 Feb 2026 19:38:28 +0000 Subject: [PATCH 2/5] =?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, 3 insertions(+), 21 deletions(-) diff --git a/python-debug-lab-20260129/debug_exercise_01.ipynb b/python-debug-lab-20260129/debug_exercise_01.ipynb index 630a55a..4c931da 100644 --- a/python-debug-lab-20260129/debug_exercise_01.ipynb +++ b/python-debug-lab-20260129/debug_exercise_01.ipynb @@ -16,29 +16,11 @@ "cells": [ { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": { - "id": "JAxCEAYjWUfd", - "outputId": "22726a4c-9ff6-4c7d-c9e4-4d45cb7b6273", - "colab": { - "base_uri": "https://localhost:8080/" - } + "id": "JAxCEAYjWUfd" }, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Qual é o teu nome?Paulo\n", - "Qual é a tua idade?40\n", - "Qual é o teu peso em kg?70\n", - "Olá Paulo\n", - "Tens 40 anos \n", - "Pesas 70 kg\n", - "Programa terminado\n" - ] - } - ], + "outputs": [], "source": [ "#Este programa pergunta dados do utilizador.\n", "\n", From abdf821e5acd56fccdc0c78f5de92587f9ef2a06 Mon Sep 17 00:00:00 2001 From: paulojorgeserralha-droid Date: Fri, 27 Feb 2026 19:40:48 +0000 Subject: [PATCH 3/5] =?UTF-8?q?Criado=20atrav=C3=A9s=20do=20Colab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python-debug-lab-20260129/debug_exercise_01.ipynb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/python-debug-lab-20260129/debug_exercise_01.ipynb b/python-debug-lab-20260129/debug_exercise_01.ipynb index 4c931da..19d2bce 100644 --- a/python-debug-lab-20260129/debug_exercise_01.ipynb +++ b/python-debug-lab-20260129/debug_exercise_01.ipynb @@ -22,15 +22,15 @@ }, "outputs": [], "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", + "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(\"Tens \" + idade + \" anos \")\n", - "print(\"Pesas \" + peso + \" kg\")\n", + "print(f\"Olá {nome}\")\n", + "print(f\"Tens {idade} anos\")\n", + "print(f\"Pesas {peso} kg\")\n", "\n", "print(\"Programa terminado\")" ] From 9c65523f97e15c2378d674f6090f846493818649 Mon Sep 17 00:00:00 2001 From: paulojorgeserralha-droid Date: Fri, 27 Feb 2026 21:06:02 +0000 Subject: [PATCH 4/5] =?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 | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/python-debug-lab-20260129/debug_exercise_01.ipynb b/python-debug-lab-20260129/debug_exercise_01.ipynb index 19d2bce..45551d9 100644 --- a/python-debug-lab-20260129/debug_exercise_01.ipynb +++ b/python-debug-lab-20260129/debug_exercise_01.ipynb @@ -16,17 +16,35 @@ "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": { - "id": "JAxCEAYjWUfd" + "id": "JAxCEAYjWUfd", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "ff49056f-ec71-4e46-cbd7-029853038318" }, - "outputs": [], + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Qual é o teu nome? gfhgfgh\n", + "Qual é a tua idade? 12\n", + "Qual é o teu peso em kg? 15\n", + "Olá Gfhgfgh\n", + "Tens 12 anos\n", + "Pesas 15.0 kg\n", + "Programa terminado\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", + "nome = input(\"Qual é o teu nome? \").strip().title()\n", + "idade = int(input(\"Qual é a tua idade? \"))\n", + "peso = float(input(\"Qual é o teu peso em kg? \").replace(\",\", \".\"))\n", "\n", "print(f\"Olá {nome}\")\n", "print(f\"Tens {idade} anos\")\n", From de900e1eb6fb09b30437aff5c13ffb6d2fac77bb Mon Sep 17 00:00:00 2001 From: paulojorgeserralha-droid Date: Fri, 27 Feb 2026 22:25:04 +0000 Subject: [PATCH 5/5] =?UTF-8?q?Criado=20atrav=C3=A9s=20do=20Colab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit