Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Plot Team Attendance | Tracking Athlete Performance
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Python for Coaches

bookChallenge: Plot Team Attendance

Visualizing attendance helps coaches quickly identify participation trends across the team. By creating a bar chart of team attendance, you can immediately spot which athletes are consistently present and who may need additional support or encouragement. This approach transforms raw attendance data into an accessible visual summary, making it easier to communicate and act on participation insights.

Opgave

Swipe to start coding

Write a function that takes a list of athlete attendance records and plots a bar chart showing the total number of sessions attended by each athlete.

  • Each record in the list contains a "name" and an "attendance" list.
  • The "attendance" list contains boolean values, where True indicates presence at a session.
  • The function must count the number of True values for each athlete.
  • The x-axis of the bar chart must show athlete names.
  • The y-axis must show the total sessions attended for each athlete.
  • The function must display the bar chart.

Løsning

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 7
single

single

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

close

bookChallenge: Plot Team Attendance

Stryg for at vise menuen

Visualizing attendance helps coaches quickly identify participation trends across the team. By creating a bar chart of team attendance, you can immediately spot which athletes are consistently present and who may need additional support or encouragement. This approach transforms raw attendance data into an accessible visual summary, making it easier to communicate and act on participation insights.

Opgave

Swipe to start coding

Write a function that takes a list of athlete attendance records and plots a bar chart showing the total number of sessions attended by each athlete.

  • Each record in the list contains a "name" and an "attendance" list.
  • The "attendance" list contains boolean values, where True indicates presence at a session.
  • The function must count the number of True values for each athlete.
  • The x-axis of the bar chart must show athlete names.
  • The y-axis must show the total sessions attended for each athlete.
  • The function must display the bar chart.

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 7
single

single

some-alt