071503 - Record Grades
最后更新于
这有帮助吗?
最后更新于
这有帮助吗?
瑪莉是某間學校的校長,她想請一位工程師利用寫程式的方式,來幫她記錄所有學生的成績,並自動將名次排出來。請利用 Pandas Library 將瑪莉給的資料做成她要的表格。
Mary is the principal of a school. She wants to ask an engineer to write a program to help her record the score of all students and automatically order the ranking. Please use Pandas Library to create a table with the information given by Mary.
有N筆學生資料,然後依序將學號及對應成績輸入,科目順序為:國文、英文、數學、程式、演算法。而N與學號為整數,成績為實數。
There are N students, and input the student ID and corresponding grade in order, subject order: Chinese, English, Mathematics, Program, Algorithm. Besides, N and the student ID are an integer, and the grade is a real number.
請依照學號、國文、英文、數學、程式、演算法、平均將資料記錄在表格中,並且以總平均高到低將表格排序。若總平均一樣則請依學號由小到大排序。請將平均取到小數第二位。另外,若分數不是介於0到100之前,則輸出"<<< Please enter again! >>>",並重新輸入直到符合條件為止。
Please record the data in the table according to the student ID, Chinese language, English, mathematics, program, algorithm, average, and sort the table from the average score high to low. If the average score is the same, please sort by student ID from small to large. By the way, please take the average to the second decimal place. In addition, if the score is not between 0 and 100, then output "<<< Please enter again! >>>" and re-enter until the conditions are met.
3 7 50 70 60 80 90 2 100 80 20 77 65 2 101 80 20 77 65 4 50 20 20 43 11
請搭配 字典 解題,並且確認在終端執行時,可看到與下圖一樣的格式。
Please use the Dictionary to solve the problem, and confirm that when executed in the terminal, you can see the same format as the following figure.