Company: Bajaj_Finserv_health_company_2Dec
Difficulty: medium
Dictionary Comprehension Filter Dictionary Comprehension Filter Problem Description You are given a list of student records where each record contains a student's name and their scores in different subjects. Your task is to create a filter dictionary using Python's dictionary comprehension feature. Create a dictionary where keys are student names and values are their average scores, but only include students whose average score is above a given threshold. Function Description You need to implement the function filter_students that takes student data and a threshold, then returns a dictionary of students with averages above the threshold using dictionary comprehension. Parameters: student_data : A list of tuples, where each tuple contains (name, [list of scores]). threshold : A float representing the minimum average score required. Return: A dictionary with student names as keys and their average scores as values. Input Format The first line contains an integer N representing the number