Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

CODING IN PYTHON you are required to develop a simple Assessment Management Syst

ID: 3745636 • Letter: C

Question

CODING IN PYTHON

you are required to develop a simple Assessment Management System. The system allows a user to add, search and delete the details of students and assignments. The main program should first display a menu as follows. A user needs to select an operation from the main menu.

=======================================================
Welcome to the Student and Assessment Management System
<A>add details of a student.

<I>insert assignment marks of a student
<S>search assessment marks for a student.
<Q>quit.
=======================================================
Please select an option from the above:

If a user chooses the option <A> the program then asks them to enter a student ID, name, and course one by one. Once all details for a student are entered it will display the student ID, name, and course. Then the details of the student are added to the end of the students.txt file. Note that the student ID should not be the same as those already exist in the txt file and the format of the newly added record should be consistent with that of existing records.

Once the new record has been added, the system will then ask the user 'Do you want to enter details for another student (Y/N)?'

If they enter 'Y', the system will allow them to enter details for another student as before.

If they enter 'N', the system will display the main menu again, otherwise, it will ask the same question again.

A typical example of the display of the program (once a user chooses the option <A>) can be as follows. Your program MUST follow the same display style.

Please enter the student ID: 11561234
Please enter the student name: Alan Parker
Please enter the course: MIT12

Thank You!

The details of the student you entered are as follows:
Student ID: 11561234
Student name: Alan Parker
Please enter the course: MIT12

The record has been successfully added to the students.txt file.

Do you want to enter details for another student (Y/N)? N
=================================================================
Welcome to the Student and Assessment Management System
<A>add details of a student.

<I>insert assignment marks of a student
<S>search assessment marks for a student.
<Q>quit.
=================================================================
Please select an option from the above:

After the operation, the students.txt file will have the following content after the details of Alan Parker are entered.

If a user chooses the option <I> the program then asks them to enter a student ID, subject code, assessment number and marks one by one. Once all details for a student are entered it will display the student ID, subject code, assessment number and marks. Then the details of the assessment marks are added to the end of the assessments.txt file. Note that an assessment marks the record for a student should not be added if it already exists in the assessments.txt file and the format of the newly added record should be consistent with that of existing records.

Once the new record has been added, the system will then ask the user 'Do you want to enter marks for another assessment (Y/N)?'

If they enter 'Y' the system will allow them to enter marks for another assessment as before.

If they enter 'N' the system will display the main menu again, otherwise, it will ask the same question again.

A typical example of the display of the program (once a user chooses the option <A>) can be as follows. Your program MUST follow the same display style.

Please enter the student ID: 11561234
Please enter the subject code: ITC558
Please enter the assessment number: 1

Please enter assessment marks: 95

Thank You!

The details of the student you entered are as follows:
Student ID: 11561234
Subject code: ITC558
Assessment number: 1

Assessment marks: 95

The record has been successfully added to the assessments.txt file.

Do you want to enter marks for another assessment (Y/N)? N
=================================================================
Welcome to the Student and Assessment Management System
<A>add details of a student.

<I>insert assignment marks of a student
<S>search assessment marks for a student.
<Q>quit.
=================================================================
Please select an option from the above:

After the operation, the assessments.txt file will have the following content after the marks of ITC558 of 11561234 are entered.

If a user chooses the option <S> from the main menu then the program asks the user to enter the student ID for whom they want to see details. To facilitate the search option you need to use an appropriate data structure such as List or Dictionary. The program then collects the student details from the students.txt file and assessment marks for that student from the assessments.txt file and displays them as follows (assuming the following student was searched for).

Please enter the student ID you want to search assessment marks for: 11561234

Thank You!

A student has been found:
Student ID: 11561234
Student name: Alan Parker
Course: MIT12


Subject Code Assessment Number Marks

ITC558 1 95

Do you want to search assessment marks for another student (Y/N)? N

Note: if more assessment marks are found for different subjects of the same student, they should be displayed one by one.

After displaying the assessment marks the program prompts the user with the following message, 'Do you want to search assessment marks for another student (Y/N)?'

If a user enters 'Y' then the program asks them to enter the student ID for whom the assessment marks need to be searched and displayed.

If the user enters 'N' then the program displays the main menu, otherwise, the program prompts the same message again.

Finally, the program quits if the user chooses the option <Q>.

Your program should be able to handle invalid inputs such as not-a-number or negative ages, heights and weights.

Explanation / Answer

def main(): print ("Welcome to the Student and Assessment Management System") print (" add details of a student.") print (" insert assignment marks of a student") print (" search assesment marks for a student") print (" quit") switch_case() def add(): sid=input("enter student ID:") name=input("enter name") course=input("course") global output with open("student.txt", "a") as myfile: for line in myfile: ids = line.split() for id in ids: if id not in output: myfile.write(sid, name, course) myfile.write(" ") output.append(sid) user=input("Do you want to enter details for another student (Y/N)?'") if (user=='Y'): add() else: main() def insert(): subjectId=input("enter subject ID:") subjectCode=input("enter subject Code:") assignmentId=input("enter Assignment Id:") assignmentmarks=input("enter Assignment Marks:") with open("student.txt", "a") as myfile: myfile.write(subjectId,subjectCode,assignmentId,assignmentmarks) user = input("Do you want to enter details for another student (Y/N)?'") if (user == 'Y'): insert() else: main() def search(): stid=input("Please enter the student ID you want to search assessment marks for: ") print ("Thank You!") with open("student.txt", "a") as myfile: for line in myfile: line = line.rstrip() if (stid in line.split(" ")): print(line) print(' ') user=input("Do you want to search assessment marks for another student (Y/N)? ") if (user=='Y'): search() else: main() def switch_case(argument): switcher = { 'A': add, 'I': insert, 'S': search, 'Q': quit, } print (switcher.get(argument, "Invalid entry")) if __name__=="main": main()
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote