aboutsummaryrefslogtreecommitdiff
path: root/py-class.py
diff options
context:
space:
mode:
Diffstat (limited to 'py-class.py')
-rw-r--r--py-class.py10
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()