Challenge: Simulate Sending Notifications
Teachers often need to notify students about their performance. In this challenge, you'll generate personalized messages for students based on their grades.
Swipe to start coding
Write a Python script that loops through a dictionary of student grades and prints a customized notification for each student.
- Loop through each student and their grade in the
student_gradesdictionary. - If the grade is 90 or above, print the exact message:
Congratulations {student}, you scored {grade}! Excellent work! - If the grade is between 70 and 89 inclusive, print the exact message:
Good job {student}, you scored {grade}. Keep it up! - If the grade is below 70, print the exact message:
{student}, you scored {grade}. Let's work together to improve your performance. - Use string formatting to include the student's name and grade in each message so that the output matches the examples above.
- Print the appropriate message for each student.
Soluzione
Grazie per i tuoi commenti!
single
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione
Fantastico!
Completion tasso migliorato a 4.76
Challenge: Simulate Sending Notifications
Scorri per mostrare il menu
Teachers often need to notify students about their performance. In this challenge, you'll generate personalized messages for students based on their grades.
Swipe to start coding
Write a Python script that loops through a dictionary of student grades and prints a customized notification for each student.
- Loop through each student and their grade in the
student_gradesdictionary. - If the grade is 90 or above, print the exact message:
Congratulations {student}, you scored {grade}! Excellent work! - If the grade is between 70 and 89 inclusive, print the exact message:
Good job {student}, you scored {grade}. Keep it up! - If the grade is below 70, print the exact message:
{student}, you scored {grade}. Let's work together to improve your performance. - Use string formatting to include the student's name and grade in each message so that the output matches the examples above.
- Print the appropriate message for each student.
Soluzione
Grazie per i tuoi commenti!
single