From fedc4013703d9662acdc82567d5406e5893873b0 Mon Sep 17 00:00:00 2001 From: Rishabh Singh Chauhan <143814425+Rsc2414@users.noreply.github.com> Date: Sat, 19 Jul 2025 20:48:28 +0530 Subject: [PATCH] Create 014. Introduction to Sets --- Python/04. Sets/014. Introduction to Sets | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Python/04. Sets/014. Introduction to Sets diff --git a/Python/04. Sets/014. Introduction to Sets b/Python/04. Sets/014. Introduction to Sets new file mode 100644 index 0000000..608b717 --- /dev/null +++ b/Python/04. Sets/014. Introduction to Sets @@ -0,0 +1,9 @@ +def average(array): + distinct_heights = set(array) + return round(sum(distinct_heights) / len(distinct_heights), 3) + +if __name__ == '__main__': + n = int(input()) + arr = list(map(int, input().split())) + result = average(arr) + print(result)