Challenge: Weekly Email Summary
Coaches often send weekly summaries to athletes. Automate the creation of personalized, motivational messages.
Swipe to start coding
Write a function that takes a list of athlete records and returns a list of personalized summary strings for each athlete.
- For each athlete, calculate their attendance rate as a percentage using
attended_sessionsandtotal_sessions. - Generate a summary string including the athlete's name, sessions attended, total sessions, attendance rate (rounded to one decimal place), and a motivational message based on their
performance_score. - Use the following motivational messages:
- If
performance_scoreis 90 or higher: "Outstanding performance! Keep setting the bar high." - If
performance_scoreis 75 or higher but less than 90: "Great week! Stay focused and keep pushing." - If
performance_scoreis 60 or higher but less than 75: "Good effort. A bit more consistency will pay off." - If
performance_scoreis less than 60: "Let's work together to boost your performance next week!"
- If
- Return the list of summary strings.
Solución
¡Gracias por tus comentarios!
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Can you show me an example of the kind of summary or message you want to automate?
What information about each athlete should be included in the messages?
How can I make the messages more motivational and personalized?
Genial!
Completion tasa mejorada a 4.76
Challenge: Weekly Email Summary
Desliza para mostrar el menú
Coaches often send weekly summaries to athletes. Automate the creation of personalized, motivational messages.
Swipe to start coding
Write a function that takes a list of athlete records and returns a list of personalized summary strings for each athlete.
- For each athlete, calculate their attendance rate as a percentage using
attended_sessionsandtotal_sessions. - Generate a summary string including the athlete's name, sessions attended, total sessions, attendance rate (rounded to one decimal place), and a motivational message based on their
performance_score. - Use the following motivational messages:
- If
performance_scoreis 90 or higher: "Outstanding performance! Keep setting the bar high." - If
performance_scoreis 75 or higher but less than 90: "Great week! Stay focused and keep pushing." - If
performance_scoreis 60 or higher but less than 75: "Good effort. A bit more consistency will pay off." - If
performance_scoreis less than 60: "Let's work together to boost your performance next week!"
- If
- Return the list of summary strings.
Solución
¡Gracias por tus comentarios!
single