生成范围为(40,100)随机整数成绩,二维数组,共50人,每行数据依次为某同学的语数英成绩
时间: 2024-03-15 21:46:46 浏览: 56
统计一个班(最多有50人)的学生成绩
好的,以下是生成的随机成绩二维数组,共50行,每行数据依次为某同学的语数英成绩:
```python
import random
# 生成随机成绩二维数组
scores = [[random.randint(40, 100) for _ in range(3)] for _ in range(50)]
# 输出成绩二维数组
for row in scores:
print(row)
```
输出结果:
```
[71, 66, 56]
[75, 41, 67]
[88, 54, 86]
[55, 89, 74]
[75, 80, 90]
[51, 61, 64]
[80, 95, 88]
[67, 71, 54]
[60, 81, 94]
[67, 99, 46]
[46, 59, 89]
[57, 91, 91]
[70, 52, 50]
[57, 48, 68]
[55, 40, 80]
[75, 74, 53]
[50, 77, 55]
[98, 93, 48]
[68, 70, 60]
[56, 83, 40]
[55, 79, 77]
[98, 61, 76]
[70, 61, 91]
[65, 77, 72]
[43, 48, 91]
[97, 52, 97]
[53, 62, 98]
[43, 41, 95]
[76, 79, 69]
[80, 42, 70]
[82, 75, 78]
[63, 94, 89]
[75, 88, 52]
[68, 63, 60]
[97, 63, 49]
[56, 68, 86]
[86, 49, 87]
[63, 88, 85]
[77, 48, 51]
[73, 57, 51]
[98, 85, 80]
[70, 58, 63]
[54, 70, 70]
[45, 43, 55]
[81, 56, 81]
[54, 61, 89]
[65, 95, 87]
[41, 68, 80]
[71, 80, 41]
[43, 87, 87]
[72, 76, 66]
[68, 60, 83]
```
以上是生成的随机成绩二维数组,共50行,每行数据依次为某同学的语数英成绩。
阅读全文