diff --git a/1ano/fp/aula07/README.md b/1ano/fp/aula07/README.md index 58a892a..d476f88 100644 --- a/1ano/fp/aula07/README.md +++ b/1ano/fp/aula07/README.md @@ -1,7 +1,6 @@ # Fundamentos de Programação ## Aula 07 - [Slides](https://github.com/TiagoRG/uaveiro-leci/blob/master/1ano/fp/slides/tp07-dictionaries.pdf) ### Tópico principal da aula: Dictionaries -#### Exercícios em falta: ex05.d) --- *Pode conter erros, caso encontre algum, crie um* [*ticket*](https://github.com/TiagoRG/uaveiro-leci/issues/new) diff --git a/1ano/fp/aula07/stocks.py b/1ano/fp/aula07/stocks.py index 8f74fa3..3b35f12 100755 --- a/1ano/fp/aula07/stocks.py +++ b/1ano/fp/aula07/stocks.py @@ -84,11 +84,12 @@ def stocksByDateByName(lst): return dic -# Função não completa def portfolioValue(stocks, portfolio, date): assert date in stocks val = 0.0 # Complete ... + for comp in portfolio: + val += portfolio[comp] * stocks[date][comp][CLOSE] return val