Tuple Unpacking Practice
Easy
You are given a list of tuples, each containing a student name and their score: [("Alice", 85), ("Bob", 92)]. Write a function called print_scores(students) that unpacks each tuple and prints "Name: <name>, Score: <score>" for every student.
Input
A list of tuples in the form [(name, score), ...].
Output
Printed lines, one per student, in the format "Name: <name>, Score: <score>".
Example
Input
[("Alice", 85), ("Bob", 92)]
Output
Name: Alice, Score: 85 Name: Bob, Score: 92
Use a for loop with tuple unpacking: for name, score in students:
10 XP on solve
Back to lesson
Your Solution
Output
Click "Run" to execute your code...
⏳ Loading Python runtime (first run may take a few seconds)...
Log in to submit your solution and earn XP.