Skip to content

Commit

Permalink
Update Exercício 052.py
Browse files Browse the repository at this point in the history
Added the code and a note about code function
  • Loading branch information
mateusadada committed May 3, 2023
1 parent 8fcf8ad commit 1d09ee3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Exercícios resolvidos/Exercício 052.py
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
# Inicializar um vetor com valores 2, 4, 6, 8, 10. Calcular e imprimir a soma dos valores.

print('Bem vindo ao programa de cálculo da média dos valores de uma lista!')

lista = [2, 4, 6, 8, 10]
soma = 0

print(f'Lista: {lista}')

for e in lista:
soma += e

print(f'\nSoma dos valores da lista: {soma}')

0 comments on commit 1d09ee3

Please sign in to comment.