Untitled

mail@pastecode.io avatar
unknown
python
2 years ago
802 B
2
Indexable
Never
import datetime
import enum
import uuid
from enum import Enum
from datetime import date


class Note:

    def __init__(self, note_value: object, exam_type: object, term: object, uuid, date: object) -> object:

        self.note_value = Enum('NoteValue',['2.0', '2.5', '3.0', '3.5', '4.0', '4.5', '5.0'])
        self.exam_type = Enum('ExamType', ['TEST', 'EXAM', 'PASS', 'PROJECT'])
        self.term = Enum('Term', ['FIRST', 'SECOND', 'THIRD', 'BOARD_EXAM'])
        self.uuid = uuid
        self.date = date

    def __repr__(self):
        return f"Note: UUID({self.uuid}), value: {self.note_value}, type of exam: {self.exam_type}, " \
               f"term: {self.term}, date: {self.date}"


objNote = Note('2.0', 'TEST', 'FIRST', uuid=uuid.uuid4(), date=date.today())


print(objNote.__repr__())