-1
I have an exercise where it requires that a program be created that receives racing time as input and calculates the arithmetic average of the times spent to travel a daily race course. At the end the program should display all times that were below the media in the same order that was received in the entry.
INPUT: Several integer values, one per line that represses the times spent on each race (in seconds), the entry and finalized with the insertion of a negative value that should not be accounted for.
EXIT In the first line the word "MEDIA: " shall be printed followed by the real value with two decimal places indicating the average of the times received. In the following lines the times that were below the media being printed one per line.
EXAMPLES
What I’ve achieved so far is this::
lista = []
segundos = int(input())
while segundos >= 0:
lista.append(segundos)
segundos = int(input())
media = sum(lista) / len(lista)
print(f'MEDIA: {media:.2f}')
However I was not able to make impression of values less than the average.
Evilmaax, it worked, I was confusing thinking that I needed to put inside the White.
– Mardoquel Gadi
Oops, good @Mardoquelgadi. Then give the upvote and mark the answer as accepted by clicking on "Check". So you help me, help yourself (earn points) and help anyone else get here needing that answer. Hugs
– Evilmaax