Skip to content

Latest commit

 

History

History

introduction-to-sets

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Introduction to Sets

https://www.hackerrank.com/challenges/py-introduction-to-sets/

Problem

A set is an unordered collection of elements without duplicate entries. When printed, iterated or converted into a sequence, its elements will appear in an arbitrary order.

Tasks

Now, let's use our knowledge of sets and help Mickey.

Ms. Gabriel Williams is a botany professor at District College. One day, she asked her student Mickey to compute the average of all the plants with distinct heights in her greenhouse.

Input Format

The first line contains the integer, N, the total number of plants.
The second line contains the N space separated heights of the plants.

Output Format

Output the average height value on a single line.

Sample Input 0

10
161 182 161 154 176 170 167 171 170 174

Sample Output 0

169.375

My Solution