Untitled

mail@pastecode.io avatar
unknown
python
2 years ago
552 B
2
Indexable
Never
    def update_note_by_uuid(self, uuid, new_note: enum, update_no: int):

        if self.uuid == uuid and update_no == 1:
            self.note_value = new_note
            self.term = Term.SECOND
        elif self.uuid == uuid and update_no == 2:
            self.note_value = new_note
            self.term = Term.THIRD
        elif self.uuid == uuid and update_no == 3:
            self.note_value = new_note
            self.term = Term.BOARD_EXAM
        elif self.uuid == uuid and update_no > 3:
            print('You cannot update this note.')