We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 25dc114 commit 2a22837Copy full SHA for 2a22837
Challenges/Sets/Introduction to Sets.py
@@ -0,0 +1,10 @@
1
+def average(array):
2
+ array_set= set(array)
3
+ total_number=len(array_set)
4
+ return "{:.3f}".format(sum(array_set)/total_number)
5
+
6
+if __name__ == '__main__':
7
+ n = int(input())
8
+ arr = list(map(int, input().split()))
9
+ result = average(arr)
10
+ print(result)
0 commit comments