Created
July 3, 2019 12:32
-
-
Save malkinfedor/33e9058e08c92771b74382af00dddd14 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| array = [1,2,3,4] | |
| diff = [] | |
| # найти среднеарифметическое | |
| result = float(sum(array)) / max(len(array), 1) | |
| print(result) | |
| i = 0 | |
| for number in array: | |
| min = number | |
| diff[i] = number - result | |
| if min < | |
| i = i + 1 | |
| print(number) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment