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ЁЯШК......
Related Posts
- Find the Runner-Up Score! in Python - Hacker Rank Solution | Apna Hindi Tech
- Arithmetic Operators in Python - Hacker Rank Solution | Hindi
- No Idea in python - Hacker Rank Solution | Apna Hindi Tech | Hindi Tutorial
- Write a function in Python - Hacker Rank Solution | Apna Hindi Tech | Hindi Tutorial
- Python: Division - Hacker Rank Solution | Apna Hindi Tech | Hindi Tutorial
- Loops in Python - Hacker Rank Solution | Apna Hindi Tech | Hindi Tutorial
Post a Comment
Post a Comment