1class LockPicker_4MI0600247:
2
3 def __init__(self, lock):
4 self.lock = lock
5
6 def unlock(self):
7 args = []
8 while True:
9 try:
10 self.lock.pick(*args)
11 return False
12 except Exception as ex:
13 if ex.position == None and isinstance(ex.expected, int):
14 args = [None] * ex.expected
15 elif ex.position >= 1 and isinstance(ex.expected, type):
16 args[ex.position - 1] = ex.expected()
17 else:
18 args[ex.position - 1] = ex.expected
Резултат от контролното:
19/25 верни отговора.
16 точки.
.
----------------------------------------------------------------------
Ran 1 test in 0.000s
OK