Challenge: Find Most Improved Athlete
Coaches often want to recognize athletes who show the most progress. Automate the process of finding the most improved athlete.
Swipe to start coding
Write a function that takes a list of athlete records, where each record contains a name, a list of first_half scores, and a list of second_half scores. The function should return the name of the athlete with the largest increase in average score from the first half to the second half.
- Calculate the average score for
first_halfandsecond_halffor each athlete. - Determine the difference between the second half and first half averages.
- Identify which athlete has the greatest positive difference.
- Return the
nameof that athlete.
Рішення
Дякуємо за ваш відгук!
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Чудово!
Completion показник покращився до 4.76
Challenge: Find Most Improved Athlete
Свайпніть щоб показати меню
Coaches often want to recognize athletes who show the most progress. Automate the process of finding the most improved athlete.
Swipe to start coding
Write a function that takes a list of athlete records, where each record contains a name, a list of first_half scores, and a list of second_half scores. The function should return the name of the athlete with the largest increase in average score from the first half to the second half.
- Calculate the average score for
first_halfandsecond_halffor each athlete. - Determine the difference between the second half and first half averages.
- Identify which athlete has the greatest positive difference.
- Return the
nameof that athlete.
Рішення
Дякуємо за ваш відгук!
single