python_proj_1.grade_management module¶
-
class
python_proj_1.grade_management.
GradeManagement
¶ Bases:
object
Manage the student’s credits
The “GradeManagement” class manage student’s credits. This class have functions add, delete, find, modify, print , read, sort, quit, write files.
-
add_a_new_entry
()¶ Add student info into the student list.
-
attach_index
()¶ Rendexing
-
check_input
()¶ Check input value You can only input A, D, F, M, P, R, S, Q, W.
- Raises:
ValueError: If input value is other than indicated above.
-
check_input_ext
(input_description='', prohibit_list=[])¶ Check input value using prohibit list
- Args:
input_description: The description text for input value. prohibit_list: Ths list of prohibit charactors
- For example:
check_input_ext(‘Please Input only Y, [‘Y’])
- Raises:
ValueError: If input value has the wrong.
-
delete_an_entry
()¶ Delete student info from the student list.
-
find_some_item_from_entry
()¶ The function to print index, mean, grade infomation of student
-
find_student
()¶ Add student info into the student list.
-
input_
(level=0, input_description='')¶ Base input function
- Return:
A type input function
-
input_birthday
(level=1, input_description='Input Birthday')¶ The function to check birthdate
- Return:
A type datetime.str
-
input_filename
(level=1, input_description='Input Filename')¶ The function to check if the file exists
- Return:
A type string Name if first match file
-
input_id
(level=1, input_description='Input ID')¶ The function to check (less than 8 length )
- Return:
A type String
-
input_name
(level=1, input_description='Input Name')¶ The function to check name. The length is under 10
- Return:
A type String
-
input_options
(opts, level=1, input_description='Input')¶ The function to check if the file exists
- Return:
A type string Name if first match file
-
input_score
(level=1, input_description='Input Score')¶ The function to check score between 0 and 100
- Return:
A type Integer
-
modify_an_entry
()¶ The function to modify midterm or finalterm data of students in list
- For example:
to modify data, input student ID or name data
choice a midterm or finalterm for the student
Enter the student’s score
-
print_the_contents_of_all_entries
()¶ The function to print all student credits in the memory
-
read_personal_data
()¶ The function to read data file which is student credit data.
Recreate “StudentCreditsList” from the file.
- Raises:
Exception: While reading file has wrong.
-
run
()¶ The function to run to start the program.
-
show_help_message
()¶ Show help message
-
sort_entries
()¶ The function to print sorted all student credits in the memory the sorting method is name, mean, grade.(
-
write_the_contents_to_the_same_file
()¶ The function to save all student credits
-