fork download
  1. # 第一步:创建学生成绩数据
  2. print("学生成绩分析")
  3. print("=" * 30)
  4.  
  5. # 创建5个学生的成绩数据
  6. students = [
  7. ["小明", 85, 90, 78],
  8. ["小红", 92, 88, 95],
  9. ["小刚", 78, 85, 80],
  10. ["小丽", 95, 92, 88],
  11. ["小华", 82, 79, 85]
  12. ]
  13.  
  14. print("学生成绩表:")
  15. print("姓名 语文 数学 英语")
  16. for student in students:
  17. print(f"{student[0]} {student[1]} {student[2]} {student[3]}")
Success #stdin #stdout 0.09s 14068KB
stdin
Standard input is empty
stdout
学生成绩分析
==============================
学生成绩表:
姓名 语文 数学 英语
小明  85   90   78
小红  92   88   95
小刚  78   85   80
小丽  95   92   88
小华  82   79   85