From 9db98acedeacdf531d7addbb8f4f466fa34c5d48 Mon Sep 17 00:00:00 2001 From: TiagoRG <35657250+TiagoRG@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:32:28 +0000 Subject: [PATCH 1/2] Quick simplification fix --- 1ano/1semestre/fp/extra3/ex02.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/1ano/1semestre/fp/extra3/ex02.py b/1ano/1semestre/fp/extra3/ex02.py index 06af1d6..5809bdc 100644 --- a/1ano/1semestre/fp/extra3/ex02.py +++ b/1ano/1semestre/fp/extra3/ex02.py @@ -5,12 +5,8 @@ # os primeiros n elementos igualam os últimos n elementos (sem sobreposição). def firstEqualLast(lst): - if len(lst) <= 1: - return 0 - n = 0 for i in range(1, len(lst)//2+1): - if lst[:i] == lst[len(lst)-i:]: + if lst[:i] == lst[-i:]: n = i - return n From 283b0f8e7231010914ebac09907b3a147796f47f Mon Sep 17 00:00:00 2001 From: TiagoRG <35657250+TiagoRG@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:33:20 +0000 Subject: [PATCH 2/2] README.md update --- 1ano/2semestre/README.md | 1 + 1ano/README.md | 1 + 2 files changed, 2 insertions(+) diff --git a/1ano/2semestre/README.md b/1ano/2semestre/README.md index 9b19431..2253c75 100644 --- a/1ano/2semestre/README.md +++ b/1ano/2semestre/README.md @@ -5,6 +5,7 @@ - [Laboratórios de Informática](https://github.com/TiagoRG/uaveiro-leci/tree/master/1ano/2semestre/labi) - [Laboratório de Sistemas Digitais](https://github.com/TiagoRG/uaveiro-leci/tree/master/1ano/2semestre/lsd) - [Matemática Discreta](https://github.com/TiagoRG/uaveiro-leci/tree/master/1ano/2semestre/md) +- [Cálculo - 2](https://github.com/TiagoRG/uaveiro-leci/tree/master/1ano/2semestre/c2) --- *Pode conter erros, caso encontre algum, crie um* [*ticket*](https://github.com/TiagoRG/uaveiro-leci/issues/new) diff --git a/1ano/README.md b/1ano/README.md index 3651b9e..a494f50 100755 --- a/1ano/README.md +++ b/1ano/README.md @@ -14,6 +14,7 @@ - [Laboratórios de Informática](https://github.com/TiagoRG/uaveiro-leci/tree/master/1ano/2semestre/labi) - [Laboratório de Sistemas Digitais](https://github.com/TiagoRG/uaveiro-leci/tree/master/1ano/2semestre/lsd) - [Matemática Discreta](https://github.com/TiagoRG/uaveiro-leci/tree/master/1ano/2semestre/md) +- [Cálculo - 2](https://github.com/TiagoRG/uaveiro-leci/tree/master/1ano/2semestre/c2) --- *Pode conter erros, caso encontre algum, crie um* [*ticket*](https://github.com/TiagoRG/uaveiro-leci/issues/new)