Introduction to Sets - Hacker Rank Solution | Apna Hindi Tech | Python Hacker Rank
Hello Friends
рдЖрдЬ рд╣рдо рдЖрдкрдХो Hacker Rank рдкрд░ Introduction to Sets рдХा рдХंрдк्рд▓ीрдЯ рд╕ॉрд▓्рдпूрд╢рди рдмрддाрдПंрдЧे рд╡рд╣ рднी рдЖрд╕ाрди рднाрд╖ा рдоें। рддो рджोрд╕्рддों рдЪрд▓िрдП рдЬाрдирддे рд╣ैं рд╕ॉрд▓्рдпूрд╢рди ।
Set Tutorial In Python :-
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.
Formula used:
Input Format
The first line contains the integer, , the total number of plants.
The second line contains the space separated heights of the plants.
Constraints :-
Output Format :-
Output the average height value on a single line.
Sample Input :-
Sample Output :-
Explanation :-
Here, set is the set containing the distinct heights. Using the sum() and len() functions, we can compute the average.
Solution :-
Other Hacker Rank Solutions
......Thank YouЁЯШК......
Post a Comment
Post a Comment