1. 建立一个顺序存储结构存储学生的信息: ```python students = [ {"学号": 1, "姓名": "王令", "分数": 98}, {"学号": 3, "姓名": "张成", "分数": 67}, {"学号": 5, "姓名": "陈晨", "分数": 74} ] ``` 2. 查询学号为5号学生的姓名和成绩: ```python for student in students: if student["学号"] == 5: print(f"学号:{student['学号']},姓名:{student['姓名']},分数:{student['分数']}") ``` 3. 向顺序存储结构中插入学号为8,姓名为李时,分数为89的学生信息,插入到顺序表中第2号位置: ```python students.insert(1, {"学号": 8, "姓名": "李时", "分数": 89}) ``` 4. 计算顺序表中学生平均分: ```python total_score = sum(student["分数"] for student in students) average_score = total_score / len(students) print(f"平均分:{average_score:.2f}") ``` [2024-07-20 19:16:43 | AI写代码神器 | 307点数解答]