1class LockPicker_8MI0600405:
2
3 def __init__(self, lock):
4 self.lock = lock
5
6 def unlock(self):
7 args = []
8
9 while True:
10 try:
11 if self.lock.pick(*args):
12 return 'Ало-ало, тук Нощен ястреб. Вътре сме! Край!'
13 except TypeError as err:
14 if err.position is None:
15 args.extend([None] * (err.expected - len(args)))
16 else:
17 args[err.position - 1] = err.expected()
18 except ValueError as err:
19 args[err.position - 1] = err.expected
Резултат от контролното:
21/25 верни отговора.
18 точки.
.
----------------------------------------------------------------------
Ran 1 test in 0.000s
OK
13.11.2024 16:03