Skip to content

Commit

Permalink
Update mean_calculator.py
Browse files Browse the repository at this point in the history
  • Loading branch information
palladium-o authored Nov 6, 2023
1 parent 7bef425 commit ff7462e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mean_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

diff_list = []

for i in enumerate(nums) - 1:
for i in range(len(nums)):
diff = nums[0] - nums[1]
if diff < 0:
diff = nums[1] - nums[0]
diff_list.append(diff)
nums.pop(0)

mean = sum(diff_list) / len(diff_list)

print(round(mean, 1))
print(f'mean:.1f)

0 comments on commit ff7462e

Please sign in to comment.