Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Homework
#1
I have a homework in python project which is quite big, everything is fine but I have two problems that I am having issues with. the assignment is :

I am supposed to make a program where information about students are registered such as, which program, courses they have taken exam for which they have gotten a grade on. and the information is saved in the these fies with these data.

Student.txt - <studentnr,firstname,lastname,program>
Course.txt - <coursecode,coursename>
Examresults.txt, for each exam the following needs to be registered - <coursecode,studentnr,grade>

In the program its supposed to be able to register students, courses, and exam results where the program has to check of the student, course or examresults exists from before saving. if it exists the program is supposed to give a warning that its not possible to avoid double saving.

its supposed to be able to delete a student, but only if there are no registered examresults for the student. Also its supposed to be able to print a grade list for a student with the data, program the student goes on and every exam results with, coursecode,coursename and grade. And should be able to print out a censor list for a specific course with contains coursecode and coursename and every student with studentnr,firstname,lastname,program and grade.

I have been able to make almost everything but what I am lacking is, censor list and how to delete a student.

anyone who can help? would appriciate it a ton

User has been warned for this post. Reason: bad title
Reply
#2
"deleting" a student is really just opening the file and writing that file write back, except skipping any lines that refer to that student.  If you've done everything else, this part should be easy.

The censorlist, likewise, shouldn't be that hard, as you're basically just printing out the contents of examresults.txt, but with student names attached.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020