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.
Merge branch 'devpro-br:main' into Secao01_and_Secao02_Resolucao
- Loading branch information
Showing
2 changed files
with
24 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
20 changes: 20 additions & 0 deletions
20
secao_03_estrutura_de_repeticao/ex_18_estatisticas_de_n_numeros.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,20 @@ | ||
""" | ||
Exercício 18 da seção de estrutura sequencial da Python Brasil: | ||
https://wiki.python.org.br/EstruturaDeRepeticao | ||
Faça um programa que, dado um conjunto de N números, determine o menor valor, o maior valor e a soma dos valores. | ||
>>> calcular_estatisticas() | ||
'Maior valor: não existe. Menor valor: não existe. Soma: 0' | ||
>>> calcular_estatisticas(1) | ||
'Maior valor: 1. Menor valor: 1. Soma: 1' | ||
>>> calcular_estatisticas(1, 2) | ||
'Maior valor: 2. Menor valor: 1. Soma: 3' | ||
>>> calcular_estatisticas(1, 2, -1) | ||
'Maior valor: 2. Menor valor: -1. Soma: 2' | ||
""" | ||
|
||
|
||
def calcular_estatisticas(*numeros) -> int: | ||
"""Escreva aqui em baixo a sua solução""" |