전문 번역가, 번역 회사, 웹 페이지 및 자유롭게 사용할 수 있는 번역 저장소 등을 활용합니다.
algorithmes
algorithm
마지막 업데이트: 2014-12-09
사용 빈도: 9
품질:
경고: 이 정렬은 잘못되었을 수 있습니다.
잘못된 경우 삭제해 주십시오.
algorithmes utilisÉs
algorithms used
마지막 업데이트: 2014-11-21
사용 빈도: 1
품질:
algorithmes d’ia
define a class student with attributes code, name, average, and ranking. function read_students_file(file_name): students = empty list open the file file_name in read mode for each line in the file: split the line into code, name, and average create a student object with the data add the student to the students list close the file return students function sort_and_rank_students(students): sort the students list in descending order based on average for each student in students, assign a ranking based on their position in the sorted list return the sorted students list function create_ranking_file(students, file_name): open the file file_name in write mode for each student in students: write the name, average, and ranking to the file separated by spaces close the file function create_mentions_file(students, file_name): open the file file_name in write mode for each student in students: calculate the mention based on the average (e.g., "honors" if average >= 14, else "pass") write the name, average, ranking, and mention to the file separated by spaces close the file start of the main program students = read_students_file("students.dat") sorted_students = sort_and_rank_students(students) create_ranking_file(sorted_students, "ranking.dat") create_mentions_file(sorted_students, "mentions.txt") end of the main program
마지막 업데이트: 2023-10-03
사용 빈도: 1
품질:
경고: 보이지 않는 HTML 형식이 포함되어 있습니다