Giter Club home page Giter Club logo

【问题描述】 统计成绩

从成绩单文件 report.txt(点击下载)中读取班级成绩,并完成统计分析。

姓名 语文 数学 英语 物理 化学 生物 政治 历史 地理 小A 89 94 90 96 89 92 54 73 80 小B 92 37 93 43 67 77 82 84 89 小C 90 88 87 89 82 79 79 80 82 ...

要求:

读取 report.txt 文件中的成绩; 统计每名学生总成绩、计算平均并从高到低重新排名; 汇总每一科目的平均分和总平均分(见下表第一行); 添加名次,替换60分以下的成绩为“不及格”; 将处理后的成绩另存为一个新文件(result.txt)。 结果文件内容展示:

名次 姓名 语文 数学 英语 物理 化学 生物 政治 历史 地理 总分 平均分 0 平均 72 67 76 47 63 73 77 73 82 630 70.0 1 小S 94 90 96 89 92 84 83 80 82 790 87.8 2 小D 90 88 87 89 82 79 79 83 85 762 84.7 3 小A 89 94 90 96 89 92 不及格 73 80 757 84.1 ... 21 小K 82 不及格 83 63 66 67 72 83 86 638 70.9 ...

xnsy's Projects

-git icon -git

零基础使用Git的读书笔记

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.