forked from devpro-br/lista-de-exercicios-python-brasil
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Teste do ex_7 da seção de lista issue devpro-br#68
- Loading branch information
1 parent
a46b73e
commit d4d0f8a
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
secao_04_exercicios_lista/ex_14_nome_criativo_de_exemplo.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
""" | ||
Exercício 07 da seção de listas da Python Brasil: | ||
https://wiki.python.org.br/ExerciciosListas | ||
Faça um Programa que leia um vetor de 5 números inteiros, mostre a soma, a multiplicação e os números. | ||
>>> leia_cinco_numero(1, 1, 1, 1, 1) | ||
5, 1, (1, 1, 1, 1, 1) | ||
>>> leia_cinco_numero(13, 10, 0, 7, -10) | ||
20, 0, (13, 10, 0, 7, -10) | ||
>>> leia_cinco_numero(11, -80, 50, 30, 5) | ||
16, -6600000, (11, -80, 50, 30, 5) | ||
""" | ||
from math import prod | ||
def leia_cinco_numero(*valores): | ||
print(f'{sum(valores)}, {prod(valores)}, {valores}') | ||
|