wip on rask 6

This commit is contained in:
Eggert Jung
2020-11-06 13:57:14 +01:00
parent 307a451a33
commit 755488dc5f

View File

@@ -3,7 +3,21 @@ import datetime
class Exercise00: class Exercise00:
STUDENT_NAME = "Eggert Jung" STUDENT_NAME = "Eggert Jung"
def __init__(self, txt=""):
self.__txt = txt[:17] + "..."
@staticmethod
def deadline(formatstr): def deadline(formatstr):
time = datetime.datetime(2020, 11, 11, 11, 59) time = datetime.datetime(2020, 11, 11, 11, 59)
return time.strftime(formatstr) return time.strftime(formatstr)
@property
def txt(self):
return self.__txt
def format(self, mode):
if mode == "order":
return "{2} - {1} - {0}"
if mode == "dict":
return "x, y = ({x}, {y})"