Code comprehensionExercise 5/6Basic10 XP
Who does what
Task
The program is split into three functions. Which one computes the average?
def nacitaj():
return [int(x) for x in input().split()]
def spracuj(cisla):
return sum(cisla) / len(cisla)
def vypis(priemer):
print(f"Priemer: {priemer:.1f}")
vypis(spracuj(nacitaj()))
You need to know
Your answer
Hints
Try it yourself first. Each hint reveals a little more - and lowers the reward a little.
Signed out, hints are free - but no XP is awarded either.
Solution
The solution unlocks after the last hint.