cognizance-amrita / hacktoberfest

An initiative to promote Hacktoberfest
MIT License
0 stars 35 forks source link

Finding the percentage #58

Open ndrohith09 opened 2 years ago

ndrohith09 commented 2 years ago

The provided code stub will read in a dictionary containing key/value pairs of name:[marks] for a list of students. Print the average of the marks array for the student name provided, showing 2 places after the decimal.

Example

image

Input Format

The first line contains the integer ,n the number of students' records. The next n lines contain the names and marks obtained by a student, each value separated by a space. The final line contains query_name, the name of a student to query.

Constraints

image

Output Format

Print one line: The average of the marks obtained by the particular student correct to 2 decimal places.

Sample Input 0

3
Krishna 67 68 69
Arjun 70 98 63
Malika 52 56 60
Malika

Sample Output 0

56.00

Explanation 0

image

Sample Input 1

2
Harsh 25 26.5 28
Anurag 26 28 30
Harsh

Sample Output 1

26.50
riyatomar9 commented 2 years ago

I want to solve it using python

jaichiranjeeva commented 2 years ago

I would like to solve this question in java

likhi-23 commented 2 years ago

i would like to solve this question in c++