diff options
author | Zhongheng Liu <z.liu@outlook.com.gr> | 2025-01-30 09:38:59 +0200 |
---|---|---|
committer | Zhongheng Liu <z.liu@outlook.com.gr> | 2025-01-30 09:38:59 +0200 |
commit | 4d873ac8e2e642118e04c1b5b1515e12cb655bde (patch) | |
tree | c1cfcbbbc2e0d35eacc4bc55a465349f07c6d37b /py-class.py | |
parent | e2c4e882f9a549e01553b60c61fdbe8b52238cbe (diff) | |
download | cs-y13-4d873ac8e2e642118e04c1b5b1515e12cb655bde.tar.gz cs-y13-4d873ac8e2e642118e04c1b5b1515e12cb655bde.tar.bz2 cs-y13-4d873ac8e2e642118e04c1b5b1515e12cb655bde.zip |
feat(class): Activity 20C
Diffstat (limited to 'py-class.py')
-rw-r--r-- | py-class.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/py-class.py b/py-class.py new file mode 100644 index 0000000..de1440e --- /dev/null +++ b/py-class.py @@ -0,0 +1,10 @@ +class Student: + def __init__(self, name: str, dateOfBirth: str, examMark: int): + self.__name = name + self.__dateOfBirth = dateOfBirth + self.__examMark = examMark + def displayExamMark(self): + print(f"{self.__name} got {self.__examMark} marks") + +myStudent = Student("Example Exampleperson", "1989-06-04", 69) +myStudent.displayExamMark() |