-2
I have the following code:
qtdNumeros = int(input())
if qtdNumeros <= 0:
menor = "Nenhum"
media = "Nenhuma"
maior = "Nenhum"
else:
menor = maior = soma = float(input())
for proximo in range(1, qtdNumeros):
valor = float(input())
soma += valor
if valor < menor:
menor = valor
elif valor > maior:
maior = valor
media = soma / qtdNumeros
print("Menor Lido:", menor)
print("Média dos Lidos:", media)
print("Maior Lido:", maior)
Instead of passing a number amount that it will read and display the media, the smaller and larger one, I would like to enter numbers until an empty row is typed, and also, display the amount of numbers that have been read. How can I implement this?