使用Python语言编写代码如下:
students = {
"Alice": [85, 76, 92, 88, 79, 94, 90],
"Bob": [78, 83, 89, 77, 81, 80],
"Charlie": [90, 87, 85, 79, 91, 84, 89, 87],
"David": [70, 65, 80, 77, 75, 72, 88, 86]
}
for name, scores in students.items():
if len(scores) > 6:
print(name)
以上代码创建了一个students字典,其中包含每个学生的测验分数列表。 使用for循环遍历该字典,如果学生的测验数大于6,则打印学生的姓名。 运行程序将输出Alice和Charlie的姓名。