├── Module_2 └── Module_2.1 │ ├── Module_2.1.10 │ ├── input.txt │ └── output.txt │ ├── Module_2.1.11 │ ├── input.txt │ └── output.txt │ ├── Module_2.1.12 │ ├── input.txt │ └── output.txt │ ├── Module_2.1.13 │ ├── input.txt │ └── output.txt │ ├── Module_2.1.14 │ ├── input.txt │ └── output.txt │ ├── Module_2.1.15 │ ├── input.txt │ └── output.txt │ ├── Module_2.1.16 │ ├── input.txt │ └── output.txt │ ├── Module_2.1.17 │ ├── input.txt │ └── output.txt │ ├── Module_2.1.18 │ ├── input.txt │ └── output.txt │ ├── Module_2.1.4 │ ├── input.txt │ └── output.txt │ ├── Module_2.1.5 │ ├── input.txt │ └── output.txt │ ├── Module_2.1.6 │ ├── input.txt │ └── output.txt │ ├── Module_2.1.7 │ ├── input.txt │ └── output.txt │ ├── Module_2.1.8 │ ├── input.txt │ └── output.txt │ └── Module_2.1.9 │ ├── input.txt │ └── output.txt ├── Module_4 ├── Module_4.3 │ ├── Module_4.3.10 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_4.3.11 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_4.3.12 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_4.3.13 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_4.3.14 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_4.3.15 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_4.3.16 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_4.3.2 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_4.3.3 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_4.3.4 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_4.3.5 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_4.3.6 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_4.3.7 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_4.3.8 │ │ ├── input.txt │ │ └── output.txt │ └── Module_4.3.9 │ │ ├── input.txt │ │ └── output.txt ├── Module_4.4 │ ├── Module_4.4.15 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_4.4.16 │ │ ├── input.txt │ │ └── output.txt │ └── Module_4.4.17 │ │ ├── input.txt │ │ └── output.txt ├── Module_4.5 │ ├── Module_4.5.13 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_4.5.14 │ │ ├── input.txt │ │ └── output.txt │ └── Module_4.5.15 │ │ ├── input.txt │ │ └── output.txt ├── Module_4.6 │ ├── Module_4.6.13 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_4.6.14 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_4.6.15 │ │ ├── input.txt │ │ └── output.txt │ └── Module_4.6.16 │ │ ├── input.txt │ │ └── output.txt ├── Module_4.7 │ ├── Module_4.7.11 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_4.7.12 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_4.7.13 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_4.7.14 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_4.7.15 │ │ ├── input.txt │ │ └── output.txt │ └── Module_4.7.16 │ │ ├── input.txt │ │ └── output.txt └── Module_4.8 │ ├── Module_4.8.16 │ ├── input.txt │ └── output.txt │ ├── Module_4.8.17 │ ├── input.txt │ └── output.txt │ ├── Module_4.8.18 │ ├── input.txt │ └── output.txt │ └── Module_4.8.19 │ ├── input.txt │ └── output.txt ├── Module_5 ├── Module_5.1 │ └── Module_5.1.15 │ │ ├── input.txt │ │ └── output.txt ├── Module_5.10 │ ├── Module_5.10.13 │ │ ├── input.txt │ │ └── output.txt │ └── Module_5.10.14 │ │ ├── input.txt │ │ └── output.txt ├── Module_5.2 │ ├── Module_5.2.13 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.2.14 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.2.15 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.2.16 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.2.17 │ │ ├── input.txt │ │ └── output.txt │ └── Module_5.2.18 │ │ ├── input.txt │ │ └── output.txt ├── Module_5.3 │ ├── Module_5.3.11 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.3.18 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.3.19 │ │ ├── input.txt │ │ └── output.txt │ └── Module_5.3.20 │ │ ├── input.txt │ │ └── output.txt ├── Module_5.4 │ ├── Module_5.4.10 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.4.11 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.4.12 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.4.13 │ │ ├── input.txt │ │ └── output.txt │ └── Module_5.4.14 │ │ ├── input.txt │ │ └── output.txt ├── Module_5.5 │ ├── Module_5.5.10 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.5.11 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.5.20 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.5.21 │ │ ├── input.txt │ │ └── output.txt │ └── Module_5.5.9 │ │ ├── input.txt │ │ └── output.txt ├── Module_5.6 │ ├── Module_5.6.10 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.6.11 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.6.12 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.6.13 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.6.14 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.6.15 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.6.16 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.6.17 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.6.18 │ │ ├── input.txt │ │ └── output.txt │ └── Module_5.6.9 │ │ ├── input.txt │ │ └── output.txt ├── Module_5.7 │ ├── Module_5.7.10 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.7.11 │ │ ├── input.txt │ │ └── output.txt │ └── Module_5.7.12 │ │ ├── input.txt │ │ └── output.txt ├── Module_5.8 │ ├── Module_5.8.10 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.8.11 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.8.12 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.8.13 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.8.14 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.8.15 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_5.8.8 │ │ ├── input.txt │ │ └── output.txt │ └── Module_5.8.9 │ │ ├── input.txt │ │ └── output.txt └── Module_5.9 │ ├── Module_5.9.24 │ ├── input.txt │ └── output.txt │ └── Module_5.9.25 │ ├── input.txt │ └── output.txt ├── Module_6 ├── Module_6.1 │ ├── Module_6.1.15 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.1.16 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.1.17 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.1.18 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.1.19 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.1.20 │ │ ├── input.txt │ │ └── output.txt │ └── Module_6.1.21 │ │ ├── input.txt │ │ └── output.txt ├── Module_6.2 │ ├── Module_6.2.10 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.2.11 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.2.12 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.2.13 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.2.14 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.2.15 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.2.16 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.2.17 │ │ ├── input.txt │ │ └── output.txt │ └── Module_6.2.18 │ │ ├── input.txt │ │ └── output.txt ├── Module_6.3 │ ├── Module_6.3.13 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.3.14 │ │ ├── input.txt │ │ └── output.txt │ └── Module_6.3.15 │ │ ├── input.txt │ │ └── output.txt ├── Module_6.4 │ └── Module_6.4.21 │ │ ├── input.txt │ │ └── output.txt ├── Module_6.5 │ ├── Module_6.5.10 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.5.11 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.5.12 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.5.13 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.5.16 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.5.17 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.5.18 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.5.5 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.5.6 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.5.7 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.5.8 │ │ ├── input.txt │ │ └── output.txt │ └── Module_6.5.9 │ │ ├── input.txt │ │ └── output.txt ├── Module_6.6 │ ├── Module_6.6.17 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.6.18 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_6.6.19 │ │ ├── input.txt │ │ └── output.txt │ └── Module_6.6.20 │ │ ├── input.txt │ │ └── output.txt └── Module_6.8 │ ├── Module_6.8.15 │ ├── input.txt │ └── output.txt │ ├── Module_6.8.16 │ ├── input.txt │ └── output.txt │ ├── Module_6.8.17 │ ├── input.txt │ └── output.txt │ ├── Module_6.8.18 │ ├── input.txt │ └── output.txt │ ├── Module_6.8.19 │ ├── input.txt │ └── output.txt │ └── Module_6.8.20 │ ├── input.txt │ └── output.txt ├── Module_7 ├── Module_7.1 │ ├── Module_7.1.23 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.1.24 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.1.25 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.1.26 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.1.27 │ │ ├── input.txt │ │ └── output.txt │ └── Module_7.1.28 │ │ ├── input.txt │ │ └── output.txt ├── Module_7.2 │ ├── Module_7.2.16 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.2.17 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.2.18 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.2.19 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.2.20 │ │ ├── input.txt │ │ └── output.txt │ └── Module_7.2.21 │ │ ├── input.txt │ │ └── output.txt ├── Module_7.3 │ ├── Module_7.3.13 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.3.14 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.3.15 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.3.16 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.3.17 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.3.18 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.3.19 │ │ ├── input.txt │ │ └── output.txt │ └── Module_7.3.20 │ │ ├── input.txt │ │ └── output.txt ├── Module_7.4 │ ├── Module_7.4.16 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.4.17 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.4.18 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.4.19 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.4.20 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.4.21 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.4.22 │ │ ├── input.txt │ │ └── output.txt │ └── Module_7.4.23 │ │ ├── input.txt │ │ └── output.txt ├── Module_7.5 │ ├── Module_7.5.11 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.5.12 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.5.13 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.5.22 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.5.23 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.5.24 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.5.25 │ │ ├── input.txt │ │ └── output.txt │ └── Module_7.5.26 │ │ ├── input.txt │ │ └── output.txt ├── Module_7.6 │ ├── Module_7.6.21 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.6.22 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.6.23 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.6.24 │ │ ├── input.txt │ │ └── output.txt │ └── Module_7.6.25 │ │ ├── input.txt │ │ └── output.txt ├── Module_7.7 │ ├── Module_7.7.11 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_7.7.12 │ │ ├── input.txt │ │ └── output.txt │ └── Module_7.7.13 │ │ ├── input.txt │ │ └── output.txt └── Module_7.8 │ ├── Module_7.8.10 │ ├── input.txt │ └── output.txt │ ├── Module_7.8.11 │ ├── input.txt │ └── output.txt │ ├── Module_7.8.12 │ ├── input.txt │ └── output.txt │ ├── Module_7.8.13 │ ├── input.txt │ └── output.txt │ └── Module_7.8.9 │ ├── input.txt │ └── output.txt ├── Module_8 ├── Module_8.1 │ └── Module_8.1.13 │ │ ├── input.txt │ │ └── output.txt ├── Module_8.2 │ ├── Module_8.2.23 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_8.2.24 │ │ ├── input.txt │ │ └── output.txt │ └── Module_8.2.25 │ │ ├── input.txt │ │ └── output.txt ├── Module_8.3 │ ├── Module_8.3.15 │ │ ├── input.txt │ │ └── output.txt │ └── Module_8.3.16 │ │ ├── input.txt │ │ └── output.txt ├── Module_8.4 │ ├── Module_8.4.10 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_8.4.11 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_8.4.12 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_8.4.13 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_8.4.14 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_8.4.15 │ │ ├── input.txt │ │ └── output.txt │ └── Module_8.4.16 │ │ ├── input.txt │ │ └── output.txt ├── Module_8.5 │ ├── Module_8.5.10 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_8.5.11 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_8.5.12 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_8.5.13 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_8.5.14 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_8.5.15 │ │ ├── input.txt │ │ └── output.txt │ └── Module_8.5.16 │ │ ├── input.txt │ │ └── output.txt ├── Module_8.6 │ ├── Module_8.6.24 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_8.6.25 │ │ ├── input.txt │ │ └── output.txt │ ├── Module_8.6.26 │ │ ├── input.txt │ │ └── output.txt │ └── Module_8.6.27 │ │ ├── input.txt │ │ └── output.txt └── Module_8.7 │ ├── Module_8.7.10 │ ├── input.txt │ └── output.txt │ ├── Module_8.7.11 │ ├── input.txt │ └── output.txt │ ├── Module_8.7.12 │ ├── input.txt │ └── output.txt │ └── Module_8.7.13 │ ├── input.txt │ └── output.txt ├── Module_9 └── Module_9.1 │ ├── Module_9.1.1 │ ├── input.txt │ └── output.txt │ ├── Module_9.1.10 │ ├── input.txt │ └── output.txt │ ├── Module_9.1.11 │ ├── input.txt │ └── output.txt │ ├── Module_9.1.12 │ ├── input.txt │ └── output.txt │ ├── Module_9.1.13 │ ├── input.txt │ └── output.txt │ ├── Module_9.1.2 │ ├── input.txt │ └── output.txt │ ├── Module_9.1.3 │ ├── input.txt │ └── output.txt │ ├── Module_9.1.4 │ ├── input.txt │ └── output.txt │ ├── Module_9.1.5 │ ├── input.txt │ └── output.txt │ ├── Module_9.1.6 │ ├── input.txt │ └── output.txt │ ├── Module_9.1.7 │ ├── input.txt │ └── output.txt │ ├── Module_9.1.8 │ ├── input.txt │ └── output.txt │ └── Module_9.1.9 │ ├── input.txt │ └── output.txt └── main.py /Module_2/Module_2.1/Module_2.1.10/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] 5 | 6 | print(quantify(numbers, lambda x: x > 1)) 7 | 8 | # TEST_2: 9 | numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] 10 | 11 | print(quantify(numbers, lambda x: x % 2 == 0)) 12 | 13 | # TEST_3: 14 | numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] 15 | 16 | print(quantify(numbers, lambda x: x < 0)) 17 | 18 | # TEST_4: 19 | iterable = ['dddddd', 'a', 'aa', 'aaa', 'bbbb', 'ccccc'] 20 | 21 | print(quantify(iterable, lambda elem: len(elem) > 3)) 22 | 23 | # TEST_5: 24 | iterable = iter(['cdddddd', 'ca', 'caa', 'caaa', 'cbbbb', 'ccccc', 'c']) 25 | 26 | print(quantify(iterable, lambda elem: elem.startswith('c'))) 27 | 28 | # TEST_6: 29 | iterable = iter(['cdddddd', 'ca', 'caa', 'caaa', 'cbbbb', 'ccccc', 'c']) 30 | 31 | print(quantify(iterable, lambda elem: elem.endswith('A'))) 32 | 33 | # TEST_7: 34 | iterable = iter([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) 35 | 36 | print(quantify(iterable, lambda elem: elem == 1)) 37 | 38 | # TEST_8: 39 | iterable = iter([2, 3, 4, 5, 6, 7, 8, 9, 1]) 40 | 41 | print(quantify(iterable, lambda elem: elem == 1)) 42 | 43 | # TEST_9: 44 | iterable = iter([2, 3, 4, 1, 5, 6, 7, 8, 9, 10]) 45 | 46 | print(quantify(iterable, lambda elem: elem == 1)) 47 | 48 | # TEST_10: 49 | iterable = iter(['', 1, 0, (), [[]], [], {1: 2}]) 50 | 51 | print(quantify(iterable, None)) 52 | 53 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.10/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 9 5 | 6 | # TEST_2: 7 | 5 8 | 9 | # TEST_3: 10 | 0 11 | 12 | # TEST_4: 13 | 3 14 | 15 | # TEST_5: 16 | 7 17 | 18 | # TEST_6: 19 | 0 20 | 21 | # TEST_7: 22 | 1 23 | 24 | # TEST_8: 25 | 1 26 | 27 | # TEST_9: 28 | 1 29 | 30 | # TEST_10: 31 | 3 32 | 33 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.11/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | 2012 5 | 3 6 | 7 | # TEST_2: 8 | 2015 9 | 2 10 | 11 | # TEST_3: 12 | 2018 13 | 6 14 | 15 | # TEST_4: 16 | 2020 17 | 1 18 | 19 | # TEST_5: 20 | 2015 21 | 8 22 | 23 | # TEST_6: 24 | 2015 25 | 9 26 | 27 | # TEST_7: 28 | 2015 29 | 10 30 | 31 | # TEST_8: 32 | 2016 33 | 1 34 | 35 | # TEST_9: 36 | 2016 37 | 2 38 | 39 | # TEST_10: 40 | 2000 41 | 11 42 | 43 | # TEST_11: 44 | 1990 45 | 12 46 | 47 | # TEST_12: 48 | 2022 49 | 9 50 | 51 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.11/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 22.03.2012 5 | 6 | # TEST_2: 7 | 26.02.2015 8 | 9 | # TEST_3: 10 | 28.06.2018 11 | 12 | # TEST_4: 13 | 23.01.2020 14 | 15 | # TEST_5: 16 | 27.08.2015 17 | 18 | # TEST_6: 19 | 24.09.2015 20 | 21 | # TEST_7: 22 | 22.10.2015 23 | 24 | # TEST_8: 25 | 28.01.2016 26 | 27 | # TEST_9: 28 | 25.02.2016 29 | 30 | # TEST_10: 31 | 23.11.2000 32 | 33 | # TEST_11: 34 | 27.12.1990 35 | 36 | # TEST_12: 37 | 22.09.2022 38 | 39 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.12/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | print(is_integer('199')) 5 | 6 | # TEST_2: 7 | print(is_integer('-43')) 8 | 9 | # TEST_3: 10 | print(is_integer('5f')) 11 | 12 | # TEST_4: 13 | print(is_integer('5.0')) 14 | 15 | # TEST_5: 16 | print(is_integer('1.1')) 17 | 18 | # TEST_6: 19 | print(is_integer('1-1')) 20 | 21 | # TEST_7: 22 | print(is_integer('58593485349483423')) 23 | 24 | # TEST_8: 25 | print(is_integer('585934853t49483423')) 26 | 27 | # TEST_9: 28 | print(is_integer('1-2-3')) 29 | 30 | # TEST_10: 31 | print(is_integer('5-')) 32 | 33 | # TEST_11: 34 | print(is_integer('-p')) 35 | 36 | # TEST_12: 37 | print(is_integer('1111111111')) 38 | 39 | # TEST_13: 40 | print(is_integer('--9')) 41 | 42 | # TEST_14: 43 | print(is_integer('-0001')) 44 | print(is_integer('0001')) 45 | 46 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.12/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | 6 | # TEST_2: 7 | True 8 | 9 | # TEST_3: 10 | False 11 | 12 | # TEST_4: 13 | False 14 | 15 | # TEST_5: 16 | False 17 | 18 | # TEST_6: 19 | False 20 | 21 | # TEST_7: 22 | True 23 | 24 | # TEST_8: 25 | False 26 | 27 | # TEST_9: 28 | False 29 | 30 | # TEST_10: 31 | False 32 | 33 | # TEST_11: 34 | False 35 | 36 | # TEST_12: 37 | True 38 | 39 | # TEST_13: 40 | False 41 | 42 | # TEST_14: 43 | True 44 | True 45 | 46 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.13/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | 6 | # TEST_2: 7 | True 8 | 9 | # TEST_3: 10 | True 11 | 12 | # TEST_4: 13 | False 14 | 15 | # TEST_5: 16 | True 17 | 18 | # TEST_6: 19 | True 20 | 21 | # TEST_7: 22 | False 23 | 24 | # TEST_8: 25 | False 26 | 27 | # TEST_9: 28 | False 29 | 30 | # TEST_10: 31 | False 32 | 33 | # TEST_11: 34 | False 35 | 36 | # TEST_12: 37 | False 38 | 39 | # TEST_13: 40 | False 41 | 42 | # TEST_14: 43 | False 44 | 45 | # TEST_15: 46 | False 47 | 48 | # TEST_16: 49 | False 50 | 51 | # TEST_17: 52 | False 53 | 54 | # TEST_18: 55 | True 56 | 57 | # TEST_19: 58 | True 59 | 60 | # TEST_20: 61 | False 62 | 63 | # TEST_21: 64 | False 65 | 66 | # TEST_22: 67 | True 68 | False 69 | True 70 | False 71 | 72 | # TEST_23: 73 | True 74 | True 75 | 76 | # TEST_24: 77 | False 78 | False 79 | False 80 | False 81 | 82 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.14/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | 6 | # TEST_2: 7 | True 8 | 9 | # TEST_3: 10 | False 11 | 12 | # TEST_4: 13 | False 14 | 15 | # TEST_5: 16 | False 17 | 18 | # TEST_6: 19 | False 20 | 21 | # TEST_7: 22 | False 23 | 24 | # TEST_8: 25 | True 26 | 27 | # TEST_9: 28 | True 29 | 30 | # TEST_10: 31 | False 32 | 33 | # TEST_11: 34 | True 35 | 36 | # TEST_12: 37 | False 38 | 39 | # TEST_13: 40 | False 41 | 42 | # TEST_14: 43 | False 44 | 45 | # TEST_15: 46 | False 47 | 48 | # TEST_16: 49 | False 50 | 51 | # TEST_17: 52 | False 53 | 54 | # TEST_18: 55 | False 56 | 57 | # TEST_19: 58 | False 59 | 60 | # TEST_20: 61 | True 62 | 63 | # TEST_21: 64 | False 65 | 66 | # TEST_22: 67 | False 68 | 69 | # TEST_23: 70 | True 71 | 72 | # TEST_24: 73 | True 74 | True 75 | 76 | # TEST_25: 77 | True 78 | False 79 | True 80 | 81 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.15/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | print(*intersperse([1, 2, 3], 0)) 5 | 6 | # TEST_2: 7 | inter = intersperse('beegeek', '!') 8 | print(next(inter)) 9 | print(next(inter)) 10 | print(*inter) 11 | 12 | # TEST_3: 13 | print(*intersperse('A', '...')) 14 | 15 | # TEST_4: 16 | print(*intersperse(range(5), '>')) 17 | 18 | # TEST_5: 19 | iterable = iter('Beegeek') 20 | 21 | print(*intersperse(iterable, '+')) 22 | 23 | # TEST_6: 24 | iterable = iter('Be') 25 | 26 | print(*intersperse(iterable, '---')) 27 | 28 | # TEST_7: 29 | print(*intersperse([], 100)) 30 | 31 | # TEST_8: 32 | print(*intersperse('beegeek', ' ')) 33 | 34 | # TEST_9: 35 | data = intersperse(range(5), -1) 36 | print(list(data)) 37 | 38 | # TEST_10: 39 | data = intersperse(range(5), '!!!') 40 | print(list(data)) 41 | 42 | # TEST_11: 43 | data = intersperse(['John Warner Backus', 5, 'Niklaus Emil Wirth', True, 'Lawrence Gordon Tesler', None, {1, 2, 3}, {'hello': 'world'}], '—') 44 | print(list(data)) 45 | 46 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.15/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 1 0 2 0 3 5 | 6 | # TEST_2: 7 | b 8 | ! 9 | e ! e ! g ! e ! e ! k 10 | 11 | # TEST_3: 12 | A 13 | 14 | # TEST_4: 15 | 0 > 1 > 2 > 3 > 4 16 | 17 | # TEST_5: 18 | B + e + e + g + e + e + k 19 | 20 | # TEST_6: 21 | B --- e 22 | 23 | # TEST_7: 24 | 25 | 26 | # TEST_8: 27 | b e e g e e k 28 | 29 | # TEST_9: 30 | [0, -1, 1, -1, 2, -1, 3, -1, 4] 31 | 32 | # TEST_10: 33 | [0, '!!!', 1, '!!!', 2, '!!!', 3, '!!!', 4] 34 | 35 | # TEST_11: 36 | ['John Warner Backus', '—', 5, '—', 'Niklaus Emil Wirth', '—', True, '—', 'Lawrence Gordon Tesler', '—', None, '—', {1, 2, 3}, '—', {'hello': 'world'}] 37 | 38 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.16/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | for value in annual_return(120000, 10, 3): 5 | print(round(value)) 6 | 7 | # TEST_2: 8 | for value in annual_return(70000, 8, 10): 9 | print(round(value)) 10 | 11 | # TEST_3: 12 | for value in annual_return(0, 0, 10): 13 | print(round(value)) 14 | 15 | # TEST_4: 16 | for value in annual_return(100, 7, 1): 17 | print(round(value)) 18 | 19 | # TEST_5: 20 | for value in annual_return(100, 4, 40): 21 | print(round(value)) 22 | 23 | # TEST_6: 24 | for value in annual_return(100, 0, 10): 25 | print(round(value)) 26 | 27 | # TEST_7: 28 | for value in annual_return(0, 7, 10): 29 | print(round(value)) 30 | 31 | # TEST_8: 32 | for value in annual_return(0, 0, 0): 33 | print(round(value)) 34 | 35 | # TEST_9: 36 | for value in annual_return(100, 7, 10): 37 | print(round(value)) 38 | 39 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.16/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 132000 5 | 145200 6 | 159720 7 | 8 | # TEST_2: 9 | 75600 10 | 81648 11 | 88180 12 | 95234 13 | 102853 14 | 111081 15 | 119968 16 | 129565 17 | 139930 18 | 151125 19 | 20 | # TEST_3: 21 | 0 22 | 0 23 | 0 24 | 0 25 | 0 26 | 0 27 | 0 28 | 0 29 | 0 30 | 0 31 | 32 | # TEST_4: 33 | 107 34 | 35 | # TEST_5: 36 | 104 37 | 108 38 | 112 39 | 117 40 | 122 41 | 127 42 | 132 43 | 137 44 | 142 45 | 148 46 | 154 47 | 160 48 | 167 49 | 173 50 | 180 51 | 187 52 | 195 53 | 203 54 | 211 55 | 219 56 | 228 57 | 237 58 | 246 59 | 256 60 | 267 61 | 277 62 | 288 63 | 300 64 | 312 65 | 324 66 | 337 67 | 351 68 | 365 69 | 379 70 | 395 71 | 410 72 | 427 73 | 444 74 | 462 75 | 480 76 | 77 | # TEST_6: 78 | 100 79 | 100 80 | 100 81 | 100 82 | 100 83 | 100 84 | 100 85 | 100 86 | 100 87 | 100 88 | 89 | # TEST_7: 90 | 0 91 | 0 92 | 0 93 | 0 94 | 0 95 | 0 96 | 0 97 | 0 98 | 0 99 | 0 100 | 101 | # TEST_8: 102 | 103 | 104 | # TEST_9: 105 | 107 106 | 114 107 | 123 108 | 131 109 | 140 110 | 150 111 | 161 112 | 172 113 | 184 114 | 197 115 | 116 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.17/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | d = {'a': {'b': 5, 'z': 20}, 'c': {'d': 3}, 'x': 40} 5 | 6 | print(pluck(d, 'x')) 7 | 8 | # TEST_2: 9 | d = {'a': {'b': 5, 'z': 20}, 'c': {'d': 3}, 'x': 40} 10 | 11 | print(pluck(d, 'a.b')) 12 | 13 | # TEST_3: 14 | d = {'a': {'b': {'c': {'d': {'e': 4}}}}} 15 | 16 | print(pluck(d, 'a.b.c')) 17 | 18 | # TEST_4: 19 | d = {'a': {'b': 5, 'z': 20}, 'c': {'d': 3}, 'x': 40} 20 | 21 | print(pluck(d, 'c.e')) 22 | 23 | # TEST_5: 24 | d = {'a': {'b': 5, 'z': 20}, 'c': {'d': 3}, 'x': 40} 25 | 26 | print(pluck(d, 'c')) 27 | 28 | # TEST_6: 29 | d = {'a': {'b': {'c': {'d': {'e': 4}}}}} 30 | 31 | print(pluck(d, 'a.b.c.d')) 32 | 33 | # TEST_7: 34 | d = {'a': {'b': {'c': {'d': {'e': 4}}}}} 35 | 36 | print(pluck(d, 'a.b.c.d.e')) 37 | 38 | # TEST_8: 39 | d = {'a': {'b': 5, 'z': 20}, 'c': {'d': 3}, 'x': 40} 40 | 41 | print(pluck(d, 'c.d')) 42 | 43 | # TEST_9: 44 | d = {'a': {'b': 5, 'z': 20}, 'c': {'d': 3}, 'x': 40} 45 | 46 | print(pluck(d, 'z', 0)) 47 | 48 | # TEST_10: 49 | d = {'firstname': 'Тимур', 'lastname': 'Гуев', 'birthdate': {'day': 10, 'month': 'October', 'year': 1993}, 50 | 'address': {'streetaddress': 'Часовая 25, кв. 127', 51 | 'city': {'region': 'Московская область', 'type': 'город', 'cityname': 'Москва'}, 52 | 'postalcode': '125315'}} 53 | 54 | print(pluck(d, 'birthdate.weekday', default='Not found')) 55 | 56 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.17/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 40 5 | 6 | # TEST_2: 7 | 5 8 | 9 | # TEST_3: 10 | {'d': {'e': 4}} 11 | 12 | # TEST_4: 13 | None 14 | 15 | # TEST_5: 16 | {'d': 3} 17 | 18 | # TEST_6: 19 | {'e': 4} 20 | 21 | # TEST_7: 22 | 4 23 | 24 | # TEST_8: 25 | 3 26 | 27 | # TEST_9: 28 | 0 29 | 30 | # TEST_10: 31 | Not found 32 | 33 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.18/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | @recviz 5 | def add(a, b): 6 | return a + b 7 | 8 | add(1, b=2) 9 | 10 | # TEST_2: 11 | @recviz 12 | def add(a, b, c, d, e): 13 | return (a + b + c) * (d + e) 14 | 15 | add('a', b='b', c='c', d=3, e=True) 16 | 17 | # TEST_3: 18 | @recviz 19 | def fib(n): 20 | if n <= 2: 21 | return 1 22 | else: 23 | return fib(n - 1) + fib(n - 2) 24 | 25 | fib(4) 26 | 27 | # TEST_4: 28 | @recviz 29 | def fact(n): 30 | if n == 0: 31 | return 1 32 | else: 33 | return n*fact(n-1) 34 | 35 | fact(5) 36 | 37 | # TEST_5: 38 | from functools import lru_cache 39 | 40 | 41 | @lru_cache 42 | @recviz 43 | def fib(n): 44 | if n <= 2: 45 | return 1 46 | else: 47 | return fib(n - 1) + fib(n - 2) 48 | 49 | 50 | fib(7) 51 | 52 | # TEST_6: 53 | @recviz 54 | def fib(n): 55 | if n <= 2: 56 | return 1 57 | else: 58 | return fib(n - 1) + fib(n - 2) 59 | 60 | 61 | fib(7) 62 | 63 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.4/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | 1 5 | 6 | # TEST_2: 7 | 2 8 | 9 | # TEST_3: 10 | 3 11 | 12 | # TEST_4: 13 | 4 14 | 15 | # TEST_5: 16 | 5 17 | 18 | # TEST_6: 19 | 6 20 | 21 | # TEST_7: 22 | 7 23 | 24 | # TEST_8: 25 | 8 26 | 27 | # TEST_9: 28 | 9 29 | 30 | # TEST_10: 31 | 10 32 | 33 | # TEST_11: 34 | 11 35 | 36 | # TEST_12: 37 | 12 38 | 39 | # TEST_13: 40 | 13 41 | 42 | # TEST_14: 43 | 14 44 | 45 | # TEST_15: 46 | 15 47 | 48 | # TEST_16: 49 | 16 50 | 51 | # TEST_17: 52 | 17 53 | 54 | # TEST_18: 55 | 18 56 | 57 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.5/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | ()()() 5 | 6 | # TEST_2: 7 | (()) 8 | 9 | # TEST_3: 10 | ()()()( 11 | 12 | # TEST_4: 13 | )( 14 | 15 | # TEST_5: 16 | (())) 17 | 18 | # TEST_6: 19 | (()()()) 20 | 21 | # TEST_7: 22 | ()()()) 23 | 24 | # TEST_8: 25 | (())))(()((()))(()())((() 26 | 27 | # TEST_9: 28 | ((())((())))(())() 29 | 30 | # TEST_10: 31 | ((())) 32 | 33 | # TEST_11: 34 | ) 35 | 36 | # TEST_12: 37 | ( 38 | 39 | # TEST_13: 40 | )()( 41 | 42 | # TEST_14: 43 | (()()(()())) 44 | 45 | # TEST_15: 46 | ((())((())))(())()(()()(()()))(()()(()()))((())((())))(())()((())) 47 | 48 | # TEST_16: 49 | ())( 50 | 51 | # TEST_17: 52 | ())(() 53 | 54 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.5/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | 6 | # TEST_2: 7 | True 8 | 9 | # TEST_3: 10 | False 11 | 12 | # TEST_4: 13 | False 14 | 15 | # TEST_5: 16 | False 17 | 18 | # TEST_6: 19 | True 20 | 21 | # TEST_7: 22 | False 23 | 24 | # TEST_8: 25 | False 26 | 27 | # TEST_9: 28 | True 29 | 30 | # TEST_10: 31 | True 32 | 33 | # TEST_11: 34 | False 35 | 36 | # TEST_12: 37 | False 38 | 39 | # TEST_13: 40 | False 41 | 42 | # TEST_14: 43 | True 44 | 45 | # TEST_15: 46 | True 47 | 48 | # TEST_16: 49 | False 50 | 51 | # TEST_17: 52 | False 53 | 54 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.6/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 3 5 | 6 | # TEST_2: 7 | 0 8 | 9 | # TEST_3: 10 | 6 11 | 12 | # TEST_4: 13 | 0 14 | 15 | # TEST_5: 16 | 1 17 | 18 | # TEST_6: 19 | 1 20 | 21 | # TEST_7: 22 | 0 23 | 24 | # TEST_8: 25 | 2 26 | 27 | # TEST_9: 28 | 12 29 | 30 | # TEST_10: 31 | 249903 32 | 33 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.7/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | Pichu 5 | Pichu 6 | Tyrogue 7 | Pichu 8 | Combee 9 | Marill 10 | Tyrogue 11 | 12 | # TEST_2: 13 | Tyrogue 14 | Pichu 15 | Combee 16 | 17 | # TEST_3: 18 | Combee 19 | Combee 20 | Marill 21 | Marill 22 | Pichu 23 | Pichu 24 | Tyrogue 25 | Tyrogue 26 | 27 | # TEST_4: 28 | Combee 29 | Pichu 30 | Tyrogue 31 | Marill 32 | Marill 33 | Marill 34 | Marill 35 | Marill 36 | Marill 37 | Marill 38 | 39 | # TEST_5: 40 | Combee 41 | Combee 42 | Combee 43 | Combee 44 | Combee 45 | Combee 46 | Combee 47 | Combee 48 | Combee 49 | Combee 50 | 51 | # TEST_6: 52 | Combee 53 | Pichu 54 | Tyrogue 55 | Marill 56 | Combee 57 | Pichu 58 | Tyrogue 59 | Marill 60 | Combee 61 | Pichu 62 | Tyrogue 63 | Marill 64 | Combee 65 | Pichu 66 | Tyrogue 67 | Marill 68 | Combee 69 | Pichu 70 | Tyrogue 71 | Marill 72 | Combee 73 | Pichu 74 | Tyrogue 75 | Marill 76 | 77 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.7/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 3 5 | 6 | # TEST_2: 7 | 0 8 | 9 | # TEST_3: 10 | 4 11 | 12 | # TEST_4: 13 | 6 14 | 15 | # TEST_5: 16 | 9 17 | 18 | # TEST_6: 19 | 20 20 | 21 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.8/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | @jsonify 5 | def make_user(id, live, options): 6 | return {'id': id, 'live': live, 'options': options} 7 | 8 | print(make_user(4, False, None)) 9 | 10 | # TEST_2: 11 | @jsonify 12 | def make_list(n): 13 | return list(range(1, n + 1)) 14 | 15 | print(make_list(10)) 16 | 17 | # TEST_3: 18 | @jsonify 19 | def make_str(s1, s2): 20 | return (s1 + s2) * 5 21 | 22 | print(make_str('bee', 'geek')) 23 | 24 | # TEST_4: 25 | @jsonify 26 | def make_square(num): 27 | return num**2 28 | 29 | print(make_square(10)) 30 | print(make_square(10.5)) 31 | 32 | # TEST_5: 33 | @jsonify 34 | def make_bool(flag): 35 | return not flag 36 | 37 | print(make_bool(True)) 38 | print(make_bool(False)) 39 | 40 | # TEST_6: 41 | @jsonify 42 | def make_None(): 43 | return None 44 | 45 | print(make_None()) 46 | 47 | # TEST_7: 48 | @jsonify 49 | def make_tuple(): 50 | """JSON-Tuple object""" 51 | return (1, '2', 3.0, None, False, {'1': True}) 52 | 53 | 54 | print(make_tuple()) 55 | print(make_tuple.__name__) 56 | print(make_tuple.__doc__) 57 | 58 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.8/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | {"id": 4, "live": false, "options": null} 5 | 6 | # TEST_2: 7 | [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] 8 | 9 | # TEST_3: 10 | "beegeekbeegeekbeegeekbeegeekbeegeek" 11 | 12 | # TEST_4: 13 | 100 14 | 110.25 15 | 16 | # TEST_5: 17 | false 18 | true 19 | 20 | # TEST_6: 21 | null 22 | 23 | # TEST_7: 24 | [1, "2", 3.0, null, false, {"1": true}] 25 | make_tuple 26 | JSON-Tuple object 27 | 28 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.9/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | (75, 180) 5 | (90, -147.45) 6 | (77.111, 149.9999) 7 | (90, 180) 8 | (55.1, 249.9) 9 | (120, 150) 10 | 11 | # TEST_2: 12 | (-90, -180) 13 | (-90.0, -180.0) 14 | (-90, 180) 15 | (90, -180) 16 | (90.0, 180.0) 17 | 18 | # TEST_3: 19 | (-90.1, 1) 20 | (-90.2, 45) 21 | (10, 180.01) 22 | (1, 180.0004) 23 | 24 | # TEST_4: 25 | (0, 0) 26 | (0.0, 0.0) 27 | (1.1, 1.1) 28 | (-43.33333333333333, -64.534895834579) 29 | (43.33333333333333, 64.534895834579) 30 | (11, 111) 31 | 32 | # TEST_5: 33 | (226.16, -180.84) 34 | (-207.51, 226.18) 35 | (-279.64, -266.69) 36 | (283.64, 1.42) 37 | (-119.59, 40.77) 38 | (-140.26, -87.16) 39 | 40 | # TEST_6: 41 | (221.99, -203.46) 42 | (-268.55, 157.83) 43 | (219.29, -6.51) 44 | (-183.96, 73.75) 45 | (30.37, -184.98) 46 | (-74.75, 30.1) 47 | (-79.66, 125.06) 48 | (104.14, 157.19) 49 | (-216.39, -236.77) 50 | (228.52, 65.93) 51 | (-243.64, -44.13) 52 | (196.12, 137.98) 53 | 54 | # TEST_7: 55 | (25.65, -31.59) 56 | (271.68, -53.93) 57 | (168.62, 7.19) 58 | (-21.8, 101.3) 59 | (-20.95, -106.72) 60 | (-194.45, -243.06) 61 | (-288.46, -256.44) 62 | (101.69, -135.92) 63 | (27.2, 112.06) 64 | (159.17, -145.82) 65 | (-115.91, -94.18) 66 | (95.71, -140.5) 67 | (213.32, 225.35) 68 | (-163.19, -208.18) 69 | 70 | # TEST_8: 71 | (261.4, -17.0) 72 | (210.67, -64.27) 73 | (-48.38, 149.44) 74 | (78.74, 105.72) 75 | 76 | -------------------------------------------------------------------------------- /Module_2/Module_2.1/Module_2.1.9/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | True 6 | True 7 | True 8 | False 9 | False 10 | 11 | # TEST_2: 12 | True 13 | True 14 | True 15 | True 16 | True 17 | 18 | # TEST_3: 19 | False 20 | False 21 | False 22 | False 23 | 24 | # TEST_4: 25 | True 26 | True 27 | True 28 | True 29 | True 30 | True 31 | 32 | # TEST_5: 33 | False 34 | False 35 | False 36 | False 37 | False 38 | False 39 | 40 | # TEST_6: 41 | False 42 | False 43 | False 44 | False 45 | False 46 | True 47 | True 48 | False 49 | False 50 | False 51 | False 52 | False 53 | 54 | # TEST_7: 55 | True 56 | False 57 | False 58 | True 59 | True 60 | False 61 | False 62 | False 63 | True 64 | False 65 | False 66 | False 67 | False 68 | False 69 | 70 | # TEST_8: 71 | False 72 | False 73 | True 74 | True 75 | 76 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.10/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | vector = Vector() 5 | 6 | print(vector.x, vector.y) 7 | print(vector.abs()) 8 | 9 | # TEST_2: 10 | vector = Vector(3, 4) 11 | 12 | print(vector.x, vector.y) 13 | print(vector.abs()) 14 | 15 | # TEST_3: 16 | vector = Vector(18, 23) 17 | 18 | print(vector.x, vector.y) 19 | print(vector.abs()) 20 | 21 | # TEST_4: 22 | array = [(76, 164), (132, 195), (181, 97), (61, 124), (19, 158), (130, 116), (101, 191), (84, 35), (190, 21), (106, 49), (91, 192), (133, 155), (170, 24), (137, 107), (114, 142), (145, 170), (167, 148), (91, 43), (25, 15), (12, 20)] 23 | 24 | for x, y in array: 25 | vector = Vector(x, y) 26 | print(vector.abs()) 27 | 28 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.10/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 0 0 5 | 0.0 6 | 7 | # TEST_2: 8 | 3 4 9 | 5.0 10 | 11 | # TEST_3: 12 | 18 23 13 | 29.206163733020468 14 | 15 | # TEST_4: 16 | 180.75397644312005 17 | 235.47611343828487 18 | 205.35335400231475 19 | 138.19189556555045 20 | 159.13830462839547 21 | 174.22973339817747 22 | 216.06017680266763 23 | 91.0 24 | 191.15700353374447 25 | 116.77756633874505 26 | 212.47352776287215 27 | 204.24005483743878 28 | 171.68575945604806 29 | 173.83325343558406 30 | 182.0988742414406 31 | 223.4390297150433 32 | 223.14345161801185 33 | 100.64790112068906 34 | 29.154759474226502 35 | 23.323807579381203 36 | 37 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.11/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | [] 5 | [] 6 | 7 | # TEST_2: 8 | [2, 4] 9 | [3, 1] 10 | 11 | # TEST_3: 12 | [] 13 | [1, 3, 1] 14 | 15 | # TEST_4: 16 | [2, 2, 4] 17 | [] 18 | 19 | # TEST_5: 20 | [2, 4] 21 | [1, 3] 22 | [2, 4] 23 | [1, 3] 24 | 25 | # TEST_6: 26 | [] 27 | [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99] 28 | 29 | # TEST_7: 30 | [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98] 31 | [] 32 | 33 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.12/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | [] 5 | [] 6 | 7 | # TEST_2: 8 | ['do', 'be', 'be'] 9 | ['better'] 10 | 11 | # TEST_3: 12 | ['my', 'to', 'to'] 13 | ['world', 'trial', 'Never', 'meant', 'never', 'meant'] 14 | 15 | # TEST_4: 16 | ['Я', 'В', 'В', 'И', 'И', 'я', 'В', 'И', 'И', 'в', 'И', 'И', 'и', 'И', 'и', 'и'] 17 | ['безнадежной', 'вдохновенья', 'пробужденье', 'вдохновенье'] 18 | 19 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.13/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | todo = Todo() 5 | 6 | print(todo.things) 7 | print(todo.get_by_priority(1)) 8 | print(todo.get_low_priority()) 9 | print(todo.get_high_priority()) 10 | 11 | # TEST_2: 12 | todo = Todo() 13 | 14 | todo.add('Проснуться', 3) 15 | todo.add('Помыться', 2) 16 | todo.add('Поесть', 2) 17 | 18 | print(todo.get_by_priority(2)) 19 | 20 | # TEST_3: 21 | todo = Todo() 22 | 23 | todo.add('Ответить на вопросы', 5) 24 | todo.add('Сделать картинки', 1) 25 | todo.add('Доделать задачи', 4) 26 | todo.add('Дописать конспект', 5) 27 | 28 | print(todo.get_low_priority()) 29 | print(todo.get_high_priority()) 30 | print(todo.get_by_priority(3)) 31 | 32 | # TEST_4: 33 | todo = Todo() 34 | 35 | todos = [ 36 | 'Выбрать хостинг для своего сайта', 37 | 'Записаться к стоматологу', 38 | 'Записаться на курсы английского', 39 | 'Навести порядок на кухне', 40 | 'Подготовить одежду к лету', 41 | 'Подготовиться к выступлению в понедельник', 42 | 'Помыть машину', 43 | 'Пропылесосить ковры', 44 | 'Свозить Кемаля к ветеринару', 45 | 'Сходить в парикмахерскую', 46 | 'Посетить выставку камней' 47 | ] 48 | 49 | priorities = [4, 1, 2, 5, 2, 5, 5, 3, 3, 3, 4] 50 | for t, p in zip(todos, priorities): 51 | todo.add(t, p) 52 | 53 | print(todo.things) 54 | print(todo.get_by_priority(3)) 55 | print(todo.get_low_priority()) 56 | print(todo.get_high_priority()) 57 | 58 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.13/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | [] 5 | [] 6 | [] 7 | [] 8 | 9 | # TEST_2: 10 | ['Помыться', 'Поесть'] 11 | 12 | # TEST_3: 13 | ['Сделать картинки'] 14 | ['Ответить на вопросы', 'Дописать конспект'] 15 | [] 16 | 17 | # TEST_4: 18 | [('Выбрать хостинг для своего сайта', 4), ('Записаться к стоматологу', 1), ('Записаться на курсы английского', 2), ('Навести порядок на кухне', 5), ('Подготовить одежду к лету', 2), ('Подготовиться к выступлению в понедельник', 5), ('Помыть машину', 5), ('Пропылесосить ковры', 3), ('Свозить Кемаля к ветеринару', 3), ('Сходить в парикмахерскую', 3), ('Посетить выставку камней', 4)] 19 | ['Пропылесосить ковры', 'Свозить Кемаля к ветеринару', 'Сходить в парикмахерскую'] 20 | ['Записаться к стоматологу'] 21 | ['Навести порядок на кухне', 'Подготовиться к выступлению в понедельник', 'Помыть машину'] 22 | 23 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.14/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | [] 5 | [] 6 | [] 7 | 8 | # TEST_2: 9 | [151, 90] 10 | [74, 75] 11 | 12 | # TEST_3: 13 | [77, 149] 14 | [22] 15 | 16 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.15/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | [] 5 | [] 6 | [] 7 | 8 | # TEST_2: 9 | [] 10 | ['bee', 'geek'] 11 | 12 | # TEST_3: 13 | ['geek', 'cool'] 14 | 15 | # TEST_4: 16 | ['o', 'to', 'otto', 't'] 17 | 18 | # TEST_5: 19 | ['timur', 'geek', 'python', 'stepik'] 20 | 21 | # TEST_6: 22 | [] 23 | 24 | # TEST_7: 25 | ['Россум'] 26 | ['Россум', 'Гейтс', 'Бэкус', 'Кнут'] 27 | 28 | # TEST_8: 29 | ['Лейбниц', 'Бэббидж', 'Нейман', 'Джобс', 'да_Винчи', 'Касперский', 'Гуев', 'Харисов', 'Светкин'] 30 | ['Лейбниц', 'Бэббидж', 'Нейман', 'Джобс', 'да_Винчи', 'Касперский'] 31 | 32 | # TEST_9: 33 | ['a', 'arthur', 'timur', 'bee', 'geek', 'python', 'stepik'] 34 | ['a', 'arthur', 'timur', 'bee', 'geek', 'python', 'stepik'] 35 | 36 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.16/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | knight = Knight('c', 3, 'white') 5 | 6 | print(knight.color, knight.get_char()) 7 | print(knight.horizontal, knight.vertical) 8 | 9 | # TEST_2: 10 | knight = Knight('c', 3, 'white') 11 | 12 | print(knight.horizontal, knight.vertical) 13 | print(knight.can_move('e', 5)) 14 | print(knight.can_move('e', 4)) 15 | 16 | knight.move_to('e', 4) 17 | print(knight.horizontal, knight.vertical) 18 | 19 | # TEST_3: 20 | knight = Knight('c', 3, 'white') 21 | 22 | knight.draw_board() 23 | 24 | # TEST_4: 25 | knight = Knight('e', 5, 'black') 26 | 27 | knight.draw_board() 28 | knight.move_to('d', 3) 29 | print() 30 | knight.draw_board() 31 | 32 | # TEST_5: 33 | knight = Knight('a', 1, 'white') 34 | 35 | knight.draw_board() 36 | knight.move_to('e', 8) 37 | print() 38 | knight.draw_board() 39 | 40 | # TEST_6: 41 | knight = Knight('g', 7, 'black') 42 | knight.draw_board() 43 | 44 | # TEST_7: 45 | knight = Knight('d', 8, 'white') 46 | knight.draw_board() 47 | 48 | # TEST_8: 49 | knight = Knight('h', 1, 'black') 50 | knight.draw_board() 51 | 52 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.16/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | white N 5 | c 3 6 | 7 | # TEST_2: 8 | c 3 9 | False 10 | True 11 | e 4 12 | 13 | # TEST_3: 14 | ........ 15 | ........ 16 | ........ 17 | .*.*.... 18 | *...*... 19 | ..N..... 20 | *...*... 21 | .*.*.... 22 | 23 | # TEST_4: 24 | ........ 25 | ...*.*.. 26 | ..*...*. 27 | ....N... 28 | ..*...*. 29 | ...*.*.. 30 | ........ 31 | ........ 32 | 33 | ........ 34 | ........ 35 | ........ 36 | ..*.*... 37 | .*...*.. 38 | ...N.... 39 | .*...*.. 40 | ..*.*... 41 | 42 | # TEST_5: 43 | ........ 44 | ........ 45 | ........ 46 | ........ 47 | ........ 48 | .*...... 49 | ..*..... 50 | N....... 51 | 52 | ........ 53 | ........ 54 | ........ 55 | ........ 56 | ........ 57 | .*...... 58 | ..*..... 59 | N....... 60 | 61 | # TEST_6: 62 | ....*... 63 | ......N. 64 | ....*... 65 | .....*.* 66 | ........ 67 | ........ 68 | ........ 69 | ........ 70 | 71 | # TEST_7: 72 | ...N.... 73 | .*...*.. 74 | ..*.*... 75 | ........ 76 | ........ 77 | ........ 78 | ........ 79 | ........ 80 | 81 | # TEST_8: 82 | ........ 83 | ........ 84 | ........ 85 | ........ 86 | ........ 87 | ......*. 88 | .....*.. 89 | .......N 90 | 91 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.2/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | gun = Gun() 5 | 6 | gun.shoot() 7 | 8 | # TEST_2: 9 | gun = Gun() 10 | 11 | gun.shoot() 12 | gun.shoot() 13 | gun.shoot() 14 | 15 | # TEST_3: 16 | gun1 = Gun() 17 | gun2 = Gun() 18 | 19 | gun1.shoot() 20 | gun2.shoot() 21 | gun1.shoot() 22 | gun2.shoot() 23 | 24 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.2/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | pif 5 | 6 | # TEST_2: 7 | pif 8 | pif 9 | pif 10 | 11 | # TEST_3: 12 | pif 13 | pif 14 | pif 15 | pif 16 | 17 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.3/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | user = User('Arthur') 5 | 6 | print(user.friends) 7 | 8 | # TEST_2: 9 | user = User('Timur') 10 | 11 | user.add_friends(2) 12 | user.add_friends(2) 13 | user.add_friends(3) 14 | 15 | print(user.friends) 16 | 17 | # TEST_3: 18 | user1 = User('Arthur') 19 | user2 = User('Timur') 20 | 21 | print(user1.friends) 22 | print(user2.friends) 23 | 24 | user1.add_friends(10) 25 | user1.add_friends(20) 26 | 27 | print(user1.friends) 28 | print(user2.friends) 29 | 30 | # TEST_4: 31 | user = User('Arthur') 32 | 33 | user.add_friends(0) 34 | user.add_friends(1) 35 | user.add_friends(2) 36 | user.add_friends(0) 37 | user.add_friends(1) 38 | user.add_friends(2) 39 | 40 | print(user.friends) 41 | 42 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.3/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 0 5 | 6 | # TEST_2: 7 | 7 8 | 9 | # TEST_3: 10 | 0 11 | 0 12 | 30 13 | 0 14 | 15 | # TEST_4: 16 | 6 17 | 18 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.4/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | house = House('white', 4) 5 | 6 | print(house.color) 7 | print(house.rooms) 8 | 9 | # TEST_2: 10 | house = House('white', 4) 11 | 12 | house.paint('black') 13 | house.add_rooms(1) 14 | 15 | print(house.color) 16 | print(house.rooms) 17 | 18 | # TEST_3: 19 | house1 = House('white', 4) 20 | house2 = House('black', 3) 21 | 22 | house1.paint('yellow') 23 | house1.add_rooms(1) 24 | house1.add_rooms(10) 25 | 26 | print(house1.color, house1.rooms) 27 | print(house2.color, house2.rooms) 28 | 29 | # TEST_4: 30 | house = House('white', 1) 31 | 32 | house.paint('yellow') 33 | house.paint('black') 34 | house.add_rooms(0) 35 | house.add_rooms(1) 36 | house.add_rooms(3) 37 | house.add_rooms(0) 38 | house.add_rooms(1) 39 | 40 | print(house.color) 41 | print(house.rooms) 42 | 43 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.4/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | white 5 | 4 6 | 7 | # TEST_2: 8 | black 9 | 5 10 | 11 | # TEST_3: 12 | yellow 15 13 | black 3 14 | 15 | # TEST_4: 16 | black 17 | 6 18 | 19 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.5/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | circle = Circle(1) 5 | 6 | print(circle.radius) 7 | 8 | # TEST_2: 9 | circle = Circle(5) 10 | 11 | print(circle.radius) 12 | print(circle.diameter) 13 | print(circle.area) 14 | 15 | # TEST_3: 16 | circle = Circle(20) 17 | print(hasattr(circle, 'radius')) 18 | print(hasattr(circle, 'diameter')) 19 | print(hasattr(circle, 'area')) 20 | 21 | # TEST_4: 22 | array = [85, 74, 34, 33, 19, 15, 65, 91, 17, 15, 95, 17, 57, 35, 61, 29, 98, 74, 65, 27] 23 | 24 | for radius in array: 25 | circle = Circle(radius) 26 | print('Радиус =', circle.radius, 'Диаметр =', circle.diameter, 'Площадь =', round(circle.area, 2)) 27 | 28 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.5/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 1 5 | 6 | # TEST_2: 7 | 5 8 | 10 9 | 78.53981633974483 10 | 11 | # TEST_3: 12 | True 13 | True 14 | True 15 | 16 | # TEST_4: 17 | Радиус = 85 Диаметр = 170 Площадь = 22698.01 18 | Радиус = 74 Диаметр = 148 Площадь = 17203.36 19 | Радиус = 34 Диаметр = 68 Площадь = 3631.68 20 | Радиус = 33 Диаметр = 66 Площадь = 3421.19 21 | Радиус = 19 Диаметр = 38 Площадь = 1134.11 22 | Радиус = 15 Диаметр = 30 Площадь = 706.86 23 | Радиус = 65 Диаметр = 130 Площадь = 13273.23 24 | Радиус = 91 Диаметр = 182 Площадь = 26015.53 25 | Радиус = 17 Диаметр = 34 Площадь = 907.92 26 | Радиус = 15 Диаметр = 30 Площадь = 706.86 27 | Радиус = 95 Диаметр = 190 Площадь = 28352.87 28 | Радиус = 17 Диаметр = 34 Площадь = 907.92 29 | Радиус = 57 Диаметр = 114 Площадь = 10207.03 30 | Радиус = 35 Диаметр = 70 Площадь = 3848.45 31 | Радиус = 61 Диаметр = 122 Площадь = 11689.87 32 | Радиус = 29 Диаметр = 58 Площадь = 2642.08 33 | Радиус = 98 Диаметр = 196 Площадь = 30171.86 34 | Радиус = 74 Диаметр = 148 Площадь = 17203.36 35 | Радиус = 65 Диаметр = 130 Площадь = 13273.23 36 | Радиус = 27 Диаметр = 54 Площадь = 2290.22 37 | 38 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.6/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | bee = Bee() 5 | 6 | print(bee.x, bee.y) 7 | 8 | # TEST_2: 9 | bee = Bee() 10 | 11 | bee.move_up(1) 12 | bee.move_right(1) 13 | bee.move_down(1) 14 | bee.move_left(1) 15 | 16 | print(bee.x, bee.y) 17 | 18 | # TEST_3: 19 | bee = Bee() 20 | 21 | bee.move_right(2) 22 | bee.move_right(2) 23 | bee.move_up(3) 24 | bee.move_left(1) 25 | bee.move_down(1) 26 | 27 | print(bee.x, bee.y) 28 | 29 | # TEST_4: 30 | bee = Bee(3, 4) 31 | print(bee.x, bee.y) 32 | 33 | bee.move_right(3) 34 | print(bee.x, bee.y) 35 | 36 | bee.move_up(5) 37 | print(bee.x, bee.y) 38 | 39 | bee.move_left(2) 40 | print(bee.x, bee.y) 41 | 42 | bee.move_down(10) 43 | print(bee.x, bee.y) 44 | 45 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.6/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 0 0 5 | 6 | # TEST_2: 7 | 0 0 8 | 9 | # TEST_3: 10 | 3 2 11 | 12 | # TEST_4: 13 | 3 4 14 | 6 4 15 | 6 9 16 | 4 9 17 | 4 -1 18 | 19 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.7/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | gun = Gun() 5 | 6 | gun.shoot() 7 | 8 | # TEST_2: 9 | gun = Gun() 10 | 11 | gun.shoot() 12 | gun.shoot() 13 | gun.shoot() 14 | gun.shoot() 15 | 16 | # TEST_3: 17 | gun1 = Gun() 18 | gun2 = Gun() 19 | 20 | gun1.shoot() 21 | gun2.shoot() 22 | gun1.shoot() 23 | gun2.shoot() 24 | gun1.shoot() 25 | gun2.shoot() 26 | gun1.shoot() 27 | gun2.shoot() 28 | 29 | # TEST_4: 30 | gun1 = Gun() 31 | gun2 = Gun() 32 | 33 | gun1.shoot() 34 | gun2.shoot() 35 | gun1.shoot() 36 | gun2.shoot() 37 | gun1.shoot() 38 | gun2.shoot() 39 | gun1.shoot() 40 | gun2.shoot() 41 | gun1.shoot() 42 | gun2.shoot() 43 | gun1.shoot() 44 | gun2.shoot() 45 | gun1.shoot() 46 | gun2.shoot() 47 | gun1.shoot() 48 | gun1.shoot() 49 | gun2.shoot() 50 | gun1.shoot() 51 | 52 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.7/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | pif 5 | 6 | # TEST_2: 7 | pif 8 | paf 9 | pif 10 | paf 11 | 12 | # TEST_3: 13 | pif 14 | pif 15 | paf 16 | paf 17 | pif 18 | pif 19 | paf 20 | paf 21 | 22 | # TEST_4: 23 | pif 24 | pif 25 | paf 26 | paf 27 | pif 28 | pif 29 | paf 30 | paf 31 | pif 32 | pif 33 | paf 34 | paf 35 | pif 36 | pif 37 | paf 38 | pif 39 | paf 40 | paf 41 | 42 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.8/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 0 5 | pif 6 | 1 7 | paf 8 | 2 9 | 10 | # TEST_2: 11 | pif 12 | paf 13 | 2 14 | 0 15 | pif 16 | 1 17 | 18 | # TEST_3: 19 | pif 20 | paf 21 | pif 22 | paf 23 | 4 24 | 0 25 | 26 | # TEST_4: 27 | 0 28 | 0 29 | 0 30 | 0 31 | pif 32 | 1 33 | paf 34 | 2 35 | pif 36 | 3 37 | paf 38 | 4 39 | pif 40 | 5 41 | 42 | # TEST_5: 43 | pif 44 | paf 45 | pif 46 | paf 47 | 4 48 | 0 49 | pif 50 | paf 51 | pif 52 | paf 53 | pif 54 | 4 55 | 5 56 | 57 | # TEST_6: 58 | pif 59 | paf 60 | pif 61 | paf 62 | 4 63 | 0 64 | 0 65 | 0 66 | pif 67 | paf 68 | pif 69 | paf 70 | pif 71 | 0 72 | 5 73 | 0 74 | 5 75 | 76 | # TEST_7: 77 | pif 78 | 1 79 | 0 80 | pif 81 | paf 82 | 83 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.9/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | scales = Scales() 5 | 6 | scales.add_right(1) 7 | scales.add_right(1) 8 | scales.add_left(2) 9 | 10 | print(scales.get_result()) 11 | 12 | # TEST_2: 13 | scales = Scales() 14 | 15 | scales.add_right(1) 16 | scales.add_left(2) 17 | 18 | print(scales.get_result()) 19 | 20 | # TEST_3: 21 | scales = Scales() 22 | 23 | scales.add_right(2) 24 | scales.add_left(1) 25 | 26 | print(scales.get_result()) 27 | 28 | # TEST_4: 29 | scales = Scales() 30 | 31 | print(scales.get_result()) 32 | 33 | # TEST_5: 34 | scales = Scales() 35 | 36 | array = [33, 66, 98, 28, 83, 19, 9, 2, 60, 67, 92, 60, 73, 87, 32, 63, 9, 94, 28, 96] 37 | right = True 38 | 39 | for item in array: 40 | if right: 41 | scales.add_right(item) 42 | else: 43 | scales.add_left(item) 44 | right = not right 45 | 46 | print(scales.get_result()) 47 | 48 | -------------------------------------------------------------------------------- /Module_4/Module_4.3/Module_4.3.9/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | Весы в равновесии 5 | 6 | # TEST_2: 7 | Левая чаша тяжелее 8 | 9 | # TEST_3: 10 | Правая чаша тяжелее 11 | 12 | # TEST_4: 13 | Весы в равновесии 14 | 15 | # TEST_5: 16 | Левая чаша тяжелее 17 | 18 | -------------------------------------------------------------------------------- /Module_4/Module_4.4/Module_4.4.15/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | circle = Circle(1) 5 | 6 | print(circle.get_radius()) 7 | print(circle.get_diameter()) 8 | print(round(circle.get_area())) 9 | 10 | # TEST_2: 11 | circle = Circle(5) 12 | 13 | print(circle.get_radius()) 14 | print(circle.get_diameter()) 15 | print(round(circle.get_area())) 16 | 17 | # TEST_3: 18 | circle = Circle(50) 19 | 20 | print(circle.get_radius()) 21 | print(circle.get_diameter()) 22 | print(round(circle.get_area())) 23 | 24 | # TEST_4: 25 | circle = Circle(18.32) 26 | 27 | print(circle.get_radius()) 28 | print(circle.get_diameter()) 29 | print(round(circle.get_area())) 30 | 31 | # TEST_5: 32 | circle = Circle(0.7) 33 | 34 | print(circle.get_radius()) 35 | print(circle.get_diameter()) 36 | print(round(circle.get_area())) 37 | 38 | # TEST_6: 39 | circle = Circle(10) 40 | print(hasattr(circle, '_radius')) 41 | print(hasattr(circle, '_diameter')) 42 | print(hasattr(circle, '_area')) 43 | 44 | -------------------------------------------------------------------------------- /Module_4/Module_4.4/Module_4.4.15/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 1 5 | 2 6 | 3 7 | 8 | # TEST_2: 9 | 5 10 | 10 11 | 79 12 | 13 | # TEST_3: 14 | 50 15 | 100 16 | 7854 17 | 18 | # TEST_4: 19 | 18.32 20 | 36.64 21 | 1054 22 | 23 | # TEST_5: 24 | 0.7 25 | 1.4 26 | 2 27 | 28 | # TEST_6: 29 | True 30 | True 31 | True 32 | 33 | -------------------------------------------------------------------------------- /Module_4/Module_4.4/Module_4.4.16/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | account = BankAccount() 5 | 6 | print(account.get_balance()) 7 | account.deposit(100) 8 | print(account.get_balance()) 9 | account.withdraw(50) 10 | print(account.get_balance()) 11 | 12 | # TEST_2: 13 | account = BankAccount(100) 14 | 15 | try: 16 | account.withdraw(150) 17 | except ValueError as e: 18 | print(e) 19 | 20 | # TEST_3: 21 | account1 = BankAccount(100) 22 | account2 = BankAccount(200) 23 | 24 | account1.transfer(account2, 50) 25 | print(account1.get_balance()) 26 | print(account2.get_balance()) 27 | 28 | # TEST_4: 29 | account1 = BankAccount(100) 30 | account2 = BankAccount(200) 31 | 32 | try: 33 | account1.transfer(account2, 150) 34 | except ValueError as e: 35 | print(e) 36 | 37 | # TEST_5: 38 | account1 = BankAccount(balance=100) 39 | account2 = BankAccount(balance=0) 40 | account1.transfer(account2, 20) 41 | print(account1.get_balance()) 42 | print(account2.get_balance()) 43 | 44 | # TEST_6: 45 | account = BankAccount() 46 | print(hasattr(account, '_balance')) 47 | 48 | # TEST_7: 49 | account = BankAccount(balance=10) 50 | account.withdraw(10) 51 | print(account.get_balance()) 52 | 53 | # TEST_8: 54 | account1 = BankAccount(balance=100) 55 | account2 = BankAccount() 56 | account1.transfer(account2, 100) 57 | print(account1.get_balance()) 58 | print(account2.get_balance()) 59 | 60 | -------------------------------------------------------------------------------- /Module_4/Module_4.4/Module_4.4.16/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 0 5 | 100 6 | 50 7 | 8 | # TEST_2: 9 | На счете недостаточно средств 10 | 11 | # TEST_3: 12 | 50 13 | 250 14 | 15 | # TEST_4: 16 | На счете недостаточно средств 17 | 18 | # TEST_5: 19 | 80 20 | 20 21 | 22 | # TEST_6: 23 | True 24 | 25 | # TEST_7: 26 | 0 27 | 28 | # TEST_8: 29 | 0 30 | 100 31 | 32 | -------------------------------------------------------------------------------- /Module_4/Module_4.4/Module_4.4.17/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | user = User('Гвидо', 67) 5 | 6 | print(user.get_name()) 7 | print(user.get_age()) 8 | 9 | # TEST_2: 10 | user = User('Гвидо', 67) 11 | 12 | user.set_name('Тимур') 13 | user.set_age(30) 14 | 15 | print(user.get_name()) 16 | print(user.get_age()) 17 | 18 | # TEST_3: 19 | user = User('Меган', 37) 20 | 21 | invalid_names = (-1, True, '', [], '123456', 'Меган906090') 22 | 23 | for name in invalid_names: 24 | try: 25 | user.set_name(name) 26 | except ValueError as e: 27 | print(e) 28 | 29 | # TEST_4: 30 | user = User('Меган', 37) 31 | 32 | invalid_ages = ('ten', [], '', [True], -1, 111, 136, -50, 18.5) 33 | for age in invalid_ages: 34 | try: 35 | user.set_age(age) 36 | except ValueError as e: 37 | print(e) 38 | 39 | # TEST_5: 40 | invalid_names = (-1, True, '', [], '123456', 'Меган906090') 41 | 42 | for name in invalid_names: 43 | try: 44 | user = User(name, 37) 45 | except ValueError as e: 46 | print(e) 47 | 48 | # TEST_6: 49 | invalid_ages = ('ten', [], '', [True], -1, 111, 136, -50) 50 | for age in invalid_ages: 51 | try: 52 | user = User('Меган', age) 53 | except ValueError as e: 54 | print(e) 55 | 56 | # TEST_7: 57 | try: 58 | user = User('Gvido_1956', '67') 59 | except ValueError as e: 60 | print(e) 61 | 62 | -------------------------------------------------------------------------------- /Module_4/Module_4.4/Module_4.4.17/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | Гвидо 5 | 67 6 | 7 | # TEST_2: 8 | Тимур 9 | 30 10 | 11 | # TEST_3: 12 | Некорректное имя 13 | Некорректное имя 14 | Некорректное имя 15 | Некорректное имя 16 | Некорректное имя 17 | Некорректное имя 18 | 19 | # TEST_4: 20 | Некорректный возраст 21 | Некорректный возраст 22 | Некорректный возраст 23 | Некорректный возраст 24 | Некорректный возраст 25 | Некорректный возраст 26 | Некорректный возраст 27 | Некорректный возраст 28 | Некорректный возраст 29 | 30 | # TEST_5: 31 | Некорректное имя 32 | Некорректное имя 33 | Некорректное имя 34 | Некорректное имя 35 | Некорректное имя 36 | Некорректное имя 37 | 38 | # TEST_6: 39 | Некорректный возраст 40 | Некорректный возраст 41 | Некорректный возраст 42 | Некорректный возраст 43 | Некорректный возраст 44 | Некорректный возраст 45 | Некорректный возраст 46 | Некорректный возраст 47 | 48 | # TEST_7: 49 | Некорректное имя 50 | 51 | -------------------------------------------------------------------------------- /Module_4/Module_4.5/Module_4.5.13/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | rectangle = Rectangle(4, 5) 5 | 6 | print(rectangle.length) 7 | print(rectangle.width) 8 | print(rectangle.perimeter) 9 | print(rectangle.area) 10 | 11 | # TEST_2: 12 | rectangle = Rectangle(4, 5) 13 | 14 | rectangle.length = 2 15 | rectangle.width = 3 16 | print(rectangle.length) 17 | print(rectangle.width) 18 | print(rectangle.perimeter) 19 | print(rectangle.area) 20 | 21 | # TEST_3: 22 | rectangle = Rectangle(20, 20) 23 | array = [(39, 48), (64, 36), (80, 56), (79, 60), (47, 30), (26, 27), (47, 69), (77, 22), (28, 78), (33, 75)] 24 | for length, width in array: 25 | rectangle.length = length 26 | rectangle.width = width 27 | print(f'Периметр = {rectangle.perimeter}, Площадь = {rectangle.area}') 28 | 29 | -------------------------------------------------------------------------------- /Module_4/Module_4.5/Module_4.5.13/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 4 5 | 5 6 | 18 7 | 20 8 | 9 | # TEST_2: 10 | 2 11 | 3 12 | 10 13 | 6 14 | 15 | # TEST_3: 16 | Периметр = 174, Площадь = 1872 17 | Периметр = 200, Площадь = 2304 18 | Периметр = 272, Площадь = 4480 19 | Периметр = 278, Площадь = 4740 20 | Периметр = 154, Площадь = 1410 21 | Периметр = 106, Площадь = 702 22 | Периметр = 232, Площадь = 3243 23 | Периметр = 198, Площадь = 1694 24 | Периметр = 212, Площадь = 2184 25 | Периметр = 216, Площадь = 2475 26 | 27 | -------------------------------------------------------------------------------- /Module_4/Module_4.5/Module_4.5.14/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | time = HourClock(7) 5 | 6 | print(time.hours) 7 | time.hours = 9 8 | print(time.hours) 9 | 10 | # TEST_2: 11 | time = HourClock(7) 12 | 13 | try: 14 | time.hours = 15 15 | except ValueError as e: 16 | print(e) 17 | 18 | # TEST_3: 19 | try: 20 | HourClock('pizza time 🕷') 21 | except ValueError as e: 22 | print(e) 23 | 24 | # TEST_4: 25 | try: 26 | HourClock(0) 27 | except ValueError as e: 28 | print(e) 29 | 30 | # TEST_5: 31 | try: 32 | HourClock('ten o`clock') 33 | except ValueError as e: 34 | print(e) 35 | 36 | # TEST_6: 37 | time = HourClock(1) 38 | 39 | print(time.hours) 40 | for _ in range(11): 41 | time.hours += 1 42 | print(time.hours) 43 | 44 | # TEST_7: 45 | time = HourClock(1) 46 | print(hasattr(HourClock, 'hours')) 47 | 48 | -------------------------------------------------------------------------------- /Module_4/Module_4.5/Module_4.5.14/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 7 5 | 9 6 | 7 | # TEST_2: 8 | Некорректное время 9 | 10 | # TEST_3: 11 | Некорректное время 12 | 13 | # TEST_4: 14 | Некорректное время 15 | 16 | # TEST_5: 17 | Некорректное время 18 | 19 | # TEST_6: 20 | 1 21 | 2 22 | 3 23 | 4 24 | 5 25 | 6 26 | 7 27 | 8 28 | 9 29 | 10 30 | 11 31 | 12 32 | 33 | # TEST_7: 34 | True 35 | 36 | -------------------------------------------------------------------------------- /Module_4/Module_4.5/Module_4.5.15/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | person = Person('Меган', 'Фокс') 5 | 6 | print(person.name) 7 | print(person.surname) 8 | print(person.fullname) 9 | 10 | # TEST_2: 11 | person = Person('Меган', 'Фокс') 12 | 13 | person.name = 'Стефани' 14 | print(person.fullname) 15 | 16 | # TEST_3: 17 | person = Person('Алан', 'Тьюринг') 18 | 19 | person.surname = 'Вирт' 20 | print(person.fullname) 21 | 22 | # TEST_4: 23 | person = Person('Джон', 'Маккарти') 24 | 25 | person.fullname = 'Алан Тьюринг' 26 | print(person.name) 27 | print(person.surname) 28 | 29 | # TEST_5: 30 | person = Person('Брайан', 'Керниган') 31 | print(hasattr(person, 'name')) 32 | print(hasattr(person, 'surname')) 33 | print(hasattr(person, 'fullname')) 34 | 35 | -------------------------------------------------------------------------------- /Module_4/Module_4.5/Module_4.5.15/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | Меган 5 | Фокс 6 | Меган Фокс 7 | 8 | # TEST_2: 9 | Стефани Фокс 10 | 11 | # TEST_3: 12 | Алан Вирт 13 | 14 | # TEST_4: 15 | Алан 16 | Тьюринг 17 | 18 | # TEST_5: 19 | True 20 | True 21 | True 22 | 23 | -------------------------------------------------------------------------------- /Module_4/Module_4.6/Module_4.6.13/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | person = Person('Mike', 'Pondsmith') 5 | 6 | print(person.name) 7 | print(person.surname) 8 | print(person.fullname) 9 | 10 | # TEST_2: 11 | person = Person('Mike', 'Pondsmith') 12 | 13 | person.name = 'Troy' 14 | print(person.fullname) 15 | 16 | # TEST_3: 17 | person = Person('Mike', 'Pondsmith') 18 | 19 | person.surname = 'Baker' 20 | print(person.fullname) 21 | 22 | # TEST_4: 23 | person = Person('Mike', 'Pondsmith') 24 | 25 | person.fullname = 'Troy Baker' 26 | print(person.name) 27 | print(person.surname) 28 | 29 | # TEST_5: 30 | person = Person('Margaret', 'Hamilton') 31 | 32 | print(hasattr(person, 'name')) 33 | print(hasattr(person, 'surname')) 34 | print(hasattr(person, 'fullname')) 35 | 36 | -------------------------------------------------------------------------------- /Module_4/Module_4.6/Module_4.6.13/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | Mike 5 | Pondsmith 6 | Mike Pondsmith 7 | 8 | # TEST_2: 9 | Troy Pondsmith 10 | 11 | # TEST_3: 12 | Mike Baker 13 | 14 | # TEST_4: 15 | Troy 16 | Baker 17 | 18 | # TEST_5: 19 | True 20 | True 21 | True 22 | 23 | -------------------------------------------------------------------------------- /Module_4/Module_4.6/Module_4.6.14/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | account = Account('hannymad', 'cakeisalie') 5 | 6 | print(account.login) 7 | print(account.password) 8 | 9 | # TEST_2: 10 | account = Account('timyr-guev', 'lovebeegeek') 11 | 12 | print(account.password) 13 | account.password = 'verylovebeegeek' 14 | print(account.password) 15 | 16 | # TEST_3: 17 | account = Account('timyr-guev', 'lovebeegeek') 18 | try: 19 | account.login = 'timyrik30' 20 | except AttributeError as e: 21 | print(e) 22 | 23 | # TEST_4: 24 | account = Account('svvaliv', 'no_one_will_know_my_password') 25 | try: 26 | account.login = 'vzohan' 27 | except AttributeError as e: 28 | print(e) 29 | 30 | # TEST_5: 31 | account = Account('gvido', 'van_rossum') 32 | 33 | print(hasattr(account, 'login')) 34 | print(hasattr(account, 'password')) 35 | 36 | -------------------------------------------------------------------------------- /Module_4/Module_4.6/Module_4.6.14/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | hannymad 5 | 4696 6 | 7 | # TEST_2: 8 | 5661 9 | 10953 10 | 11 | # TEST_3: 12 | Изменение логина невозможно 13 | 14 | # TEST_4: 15 | Изменение логина невозможно 16 | 17 | # TEST_5: 18 | True 19 | True 20 | 21 | -------------------------------------------------------------------------------- /Module_4/Module_4.6/Module_4.6.15/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 1 5 | 2 6 | -3 7 | 8 | # TEST_2: 9 | -3.0 10 | 1.0 11 | 12 | # TEST_3: 13 | 1x^2 + 2x - 3 14 | (1, 2, -3) 15 | 16 | # TEST_4: 17 | 2.0 18 | 3.0 19 | 1x^2 - 5x + 6 20 | 21 | # TEST_5: 22 | 0.0 23 | 5.0 24 | 1x^2 - 5x + 0 25 | 26 | # TEST_6: 27 | -3.0 28 | 3.0 29 | 1x^2 + 0x - 9 30 | 31 | # TEST_7: 32 | 0.0 33 | 0.0 34 | 5x^2 + 0x + 0 35 | 36 | # TEST_8: 37 | 500 -601 101 38 | 0.202 39 | 1.0 40 | (500, -601, 101) 41 | 500x^2 - 601x + 101 42 | 43 | -1000 1202 -202 44 | 1.0 45 | 0.202 46 | (-1000, 1202, -202) 47 | -1000x^2 + 1202x - 202 48 | 49 | # TEST_9: 50 | 500 -601 101 51 | 0.202 52 | 1.0 53 | (500, -601, 101) 54 | 500x^2 - 601x + 101 55 | 56 | -1000 1202 -202 57 | 1.0 58 | 0.202 59 | (-1000, 1202, -202) 60 | -1000x^2 + 1202x - 202 61 | 62 | # TEST_10: 63 | None 64 | None 65 | 5x^2 + 3x + 1 66 | 67 | -------------------------------------------------------------------------------- /Module_4/Module_4.6/Module_4.6.16/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | color = Color('0000FF') 5 | 6 | print(color.hexcode) 7 | print(color.r) 8 | print(color.g) 9 | print(color.b) 10 | 11 | # TEST_2: 12 | color = Color('0000FF') 13 | 14 | color.hexcode = 'A782E3' 15 | print(color.hexcode) 16 | print(color.r) 17 | print(color.g) 18 | print(color.b) 19 | 20 | # TEST_3: 21 | color = Color('0000FF') 22 | 23 | print(color.hexcode) 24 | print(color.r) 25 | print(color.g) 26 | print(color.b) 27 | 28 | print() 29 | 30 | color.hexcode = 'A782E3' 31 | print(color.hexcode) 32 | print(color.r) 33 | print(color.g) 34 | print(color.b) 35 | 36 | # TEST_4: 37 | hexcodes = ['FC5A5E', '13AABE', '851149', 'AAAAAA', 'FFFFFF', 'B6A1D8', 'ABCDEF', 'FEDCBA', '123456', '999999'] 38 | count = 1 39 | for hc in hexcodes: 40 | color = Color(hc) 41 | print(f'Цвет № {count}') 42 | print(color.hexcode) 43 | print(color.r, color.g, color.b, sep='\n') 44 | print() 45 | count += 1 46 | 47 | -------------------------------------------------------------------------------- /Module_4/Module_4.6/Module_4.6.16/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 0000FF 5 | 0 6 | 0 7 | 255 8 | 9 | # TEST_2: 10 | A782E3 11 | 167 12 | 130 13 | 227 14 | 15 | # TEST_3: 16 | 0000FF 17 | 0 18 | 0 19 | 255 20 | 21 | A782E3 22 | 167 23 | 130 24 | 227 25 | 26 | # TEST_4: 27 | Цвет № 1 28 | FC5A5E 29 | 252 30 | 90 31 | 94 32 | 33 | Цвет № 2 34 | 13AABE 35 | 19 36 | 170 37 | 190 38 | 39 | Цвет № 3 40 | 851149 41 | 133 42 | 17 43 | 73 44 | 45 | Цвет № 4 46 | AAAAAA 47 | 170 48 | 170 49 | 170 50 | 51 | Цвет № 5 52 | FFFFFF 53 | 255 54 | 255 55 | 255 56 | 57 | Цвет № 6 58 | B6A1D8 59 | 182 60 | 161 61 | 216 62 | 63 | Цвет № 7 64 | ABCDEF 65 | 171 66 | 205 67 | 239 68 | 69 | Цвет № 8 70 | FEDCBA 71 | 254 72 | 220 73 | 186 74 | 75 | Цвет № 9 76 | 123456 77 | 18 78 | 52 79 | 86 80 | 81 | Цвет № 10 82 | 999999 83 | 153 84 | 153 85 | 153 86 | 87 | -------------------------------------------------------------------------------- /Module_4/Module_4.7/Module_4.7.11/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | circle = Circle(5) 5 | 6 | print(circle.radius) 7 | 8 | # TEST_2: 9 | circle = Circle.from_diameter(10) 10 | 11 | print(circle.radius) 12 | 13 | # TEST_3: 14 | circle1 = Circle(51.5) 15 | circle2 = Circle.from_diameter(45) 16 | 17 | print(circle1.radius) 18 | print(circle2.radius) 19 | 20 | # TEST_4: 21 | array = [473, 474, 75, 182, 51, 491, 493, 494, 347, 305, 290, 381, 170, 355, 326, 97, 183, 120, 216, 475, 66, 306, 193, 257, 482, 200, 350, 236, 471, 468] 22 | 23 | for diameter in array: 24 | circle = Circle.from_diameter(diameter) 25 | print(circle.radius) 26 | 27 | # TEST_5: 28 | circle = Circle.from_diameter(120) 29 | print(hasattr(circle, 'radius')) 30 | 31 | -------------------------------------------------------------------------------- /Module_4/Module_4.7/Module_4.7.11/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 5 5 | 6 | # TEST_2: 7 | 5.0 8 | 9 | # TEST_3: 10 | 51.5 11 | 22.5 12 | 13 | # TEST_4: 14 | 236.5 15 | 237.0 16 | 37.5 17 | 91.0 18 | 25.5 19 | 245.5 20 | 246.5 21 | 247.0 22 | 173.5 23 | 152.5 24 | 145.0 25 | 190.5 26 | 85.0 27 | 177.5 28 | 163.0 29 | 48.5 30 | 91.5 31 | 60.0 32 | 108.0 33 | 237.5 34 | 33.0 35 | 153.0 36 | 96.5 37 | 128.5 38 | 241.0 39 | 100.0 40 | 175.0 41 | 118.0 42 | 235.5 43 | 234.0 44 | 45 | # TEST_5: 46 | True 47 | 48 | -------------------------------------------------------------------------------- /Module_4/Module_4.7/Module_4.7.12/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | rectangle = Rectangle(4, 5) 5 | 6 | print(rectangle.length) 7 | print(rectangle.width) 8 | 9 | # TEST_2: 10 | rectangle = Rectangle.square(5) 11 | 12 | print(rectangle.length) 13 | print(rectangle.width) 14 | 15 | # TEST_3: 16 | array = [416, 347, 228, 276, 159, 54, 302, 256, 355, 57, 370, 309, 455, 242, 345, 90, 413, 77, 143, 494, 397, 380, 477, 391, 139, 421, 367, 275, 397, 181] 17 | 18 | for side in array: 19 | rectangle = Rectangle.square(side) 20 | print(rectangle.length == rectangle.width) 21 | 22 | # TEST_4: 23 | array = [(99, 297), (215, 472), (270, 80), (453, 215), (333, 360), (52, 426), (307, 257), (425, 493), (291, 437), (57, 415)] 24 | 25 | 26 | for length, width in array: 27 | rectangle = Rectangle(length, width) 28 | print(f'Длина = {rectangle.length}, Ширина = {rectangle.width}') 29 | 30 | # TEST_5: 31 | rectangle = Rectangle(1, 2) 32 | print(hasattr(rectangle, 'length')) 33 | print(hasattr(rectangle, 'width')) 34 | 35 | -------------------------------------------------------------------------------- /Module_4/Module_4.7/Module_4.7.12/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 4 5 | 5 6 | 7 | # TEST_2: 8 | 5 9 | 5 10 | 11 | # TEST_3: 12 | True 13 | True 14 | True 15 | True 16 | True 17 | True 18 | True 19 | True 20 | True 21 | True 22 | True 23 | True 24 | True 25 | True 26 | True 27 | True 28 | True 29 | True 30 | True 31 | True 32 | True 33 | True 34 | True 35 | True 36 | True 37 | True 38 | True 39 | True 40 | True 41 | True 42 | 43 | # TEST_4: 44 | Длина = 99, Ширина = 297 45 | Длина = 215, Ширина = 472 46 | Длина = 270, Ширина = 80 47 | Длина = 453, Ширина = 215 48 | Длина = 333, Ширина = 360 49 | Длина = 52, Ширина = 426 50 | Длина = 307, Ширина = 257 51 | Длина = 425, Ширина = 493 52 | Длина = 291, Ширина = 437 53 | Длина = 57, Ширина = 415 54 | 55 | # TEST_5: 56 | True 57 | True 58 | 59 | -------------------------------------------------------------------------------- /Module_4/Module_4.7/Module_4.7.13/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | polynom = QuadraticPolynomial(1, -5, 6) 5 | 6 | print(polynom.a) 7 | print(polynom.b) 8 | print(polynom.c) 9 | 10 | # TEST_2: 11 | polynom = QuadraticPolynomial.from_iterable([2, 13, -1]) 12 | 13 | print(polynom.a) 14 | print(polynom.b) 15 | print(polynom.c) 16 | 17 | # TEST_3: 18 | polynom = QuadraticPolynomial.from_str('-1.5 4 14.8') 19 | 20 | print(polynom.a) 21 | print(polynom.b) 22 | print(polynom.c) 23 | print(polynom.a + polynom.b + polynom.c) 24 | 25 | # TEST_4: 26 | polynom = QuadraticPolynomial.from_str('-19 40 148') 27 | 28 | print(polynom.a) 29 | print(polynom.b) 30 | print(polynom.c) 31 | 32 | # TEST_5: 33 | polynom = QuadraticPolynomial.from_iterable([25, 132, -18]) 34 | 35 | print(polynom.a) 36 | print(polynom.b) 37 | print(polynom.c) 38 | 39 | # TEST_6: 40 | polynom = QuadraticPolynomial.from_iterable([2.5, 13.2, -1.8]) 41 | 42 | print(polynom.a) 43 | print(polynom.b) 44 | print(polynom.c) 45 | 46 | -------------------------------------------------------------------------------- /Module_4/Module_4.7/Module_4.7.13/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 1 5 | -5 6 | 6 7 | 8 | # TEST_2: 9 | 2 10 | 13 11 | -1 12 | 13 | # TEST_3: 14 | -1.5 15 | 4.0 16 | 14.8 17 | 17.3 18 | 19 | # TEST_4: 20 | -19 21 | 40 22 | 148 23 | 24 | # TEST_5: 25 | 25 26 | 132 27 | -18 28 | 29 | # TEST_6: 30 | 2.5 31 | 13.2 32 | -1.8 33 | 34 | -------------------------------------------------------------------------------- /Module_4/Module_4.7/Module_4.7.14/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | print(Pet.first_pet()) 5 | print(Pet.last_pet()) 6 | print(Pet.num_of_pets()) 7 | 8 | # TEST_2: 9 | pet1 = Pet('Ratchet') 10 | pet2 = Pet('Clank') 11 | pet3 = Pet('Rivet') 12 | 13 | print(Pet.first_pet().name) 14 | print(Pet.last_pet().name) 15 | print(Pet.num_of_pets()) 16 | 17 | # TEST_3: 18 | names = ['Mia', 'Tutti', 'Erin', 'Loki', 'Kelly', 'Hussy', 'Abbey', 'Luna', 'Isha', 'Diva', 'Brandy', 'Petra', 'Mandy', 'Baby', 'Caitlyn', 'Taffy', 'Odie', 'Roxxy', 'Gabby', 'Shelby', 'Dolly', 'Ashley', 'Vanilla', 'Cori'] 19 | 20 | for name in names: 21 | pet = Pet(name) 22 | 23 | print(Pet.first_pet().name) 24 | print(Pet.last_pet().name) 25 | print(Pet.num_of_pets()) 26 | 27 | # TEST_4: 28 | pet = Pet('Кемаль') 29 | 30 | print(Pet.first_pet().name) 31 | print(Pet.last_pet().name) 32 | print(Pet.num_of_pets()) 33 | 34 | # TEST_5: 35 | pet1 = Pet('Ratchet') 36 | pet2 = Pet('Clank') 37 | pet3 = Pet('Rivet') 38 | pet4 = Pet('Ratchet') 39 | pet5 = Pet('Ratchet') 40 | 41 | print(Pet.first_pet().name) 42 | print(Pet.last_pet().name) 43 | print(Pet.num_of_pets()) 44 | 45 | -------------------------------------------------------------------------------- /Module_4/Module_4.7/Module_4.7.14/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | None 5 | None 6 | 0 7 | 8 | # TEST_2: 9 | Ratchet 10 | Rivet 11 | 3 12 | 13 | # TEST_3: 14 | Mia 15 | Cori 16 | 24 17 | 18 | # TEST_4: 19 | Кемаль 20 | Кемаль 21 | 1 22 | 23 | # TEST_5: 24 | Ratchet 25 | Ratchet 26 | 5 27 | 28 | -------------------------------------------------------------------------------- /Module_4/Module_4.7/Module_4.7.16/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | True 6 | False 7 | False 8 | 9 | # TEST_2: 10 | False 11 | False 12 | True 13 | True 14 | 15 | # TEST_3: 16 | beegeek 17 | bee_geek 18 | 19 | # TEST_4: 20 | Beegeek 21 | BeeGeek 22 | 23 | # TEST_5: 24 | True 25 | True 26 | False 27 | False 28 | False 29 | True 30 | True 31 | True 32 | True 33 | 34 | # TEST_6: 35 | False 36 | False 37 | False 38 | False 39 | False 40 | False 41 | False 42 | False 43 | True 44 | True 45 | True 46 | 47 | # TEST_7: 48 | assert_equal 49 | set_up 50 | tear_down 51 | add_module_cleanup 52 | assert_raises_regex 53 | assert_almost_equal 54 | assert_not_almost_equal 55 | 56 | # TEST_8: 57 | AssertEqual 58 | TearDown 59 | AssertRaisesRegex 60 | AssertAlmostEqual 61 | AssertNotAlmostEqual 62 | Beegeek 63 | 64 | # TEST_9: 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /Module_4/Module_4.8/Module_4.8.16/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | print(Processor.process(10)) 5 | print(Processor.process(5.2)) 6 | print(Processor.process('hello')) 7 | print(Processor.process((4, 3, 2, 1))) 8 | print(Processor.process([3, 2, 1])) 9 | 10 | # TEST_2: 11 | try: 12 | Processor.process({1, 2, 3}) 13 | except TypeError as e: 14 | print(e) 15 | 16 | # TEST_3: 17 | print(Processor.process(100)) 18 | print(Processor.process(True)) 19 | print(Processor.process(False)) 20 | print(Processor.process(55.2)) 21 | print(Processor.process('beegeek_stepik_python')) 22 | print(Processor.process((23, 56, 1, 3, -3, 0, 4, 10, 11, -90))) 23 | print(Processor.process([10, 2, 11, 9, 5, -4, -90])) 24 | 25 | # TEST_4: 26 | objects = [None, {1, 2, 3}, {1: 'one', 2: 'two'}] 27 | 28 | for obj in objects: 29 | try: 30 | Processor.process(obj) 31 | except TypeError as e: 32 | print(e) 33 | 34 | -------------------------------------------------------------------------------- /Module_4/Module_4.8/Module_4.8.16/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 20 5 | 10.4 6 | HELLO 7 | (1, 2, 3, 4) 8 | [1, 2, 3] 9 | 10 | # TEST_2: 11 | Аргумент переданного типа не поддерживается 12 | 13 | # TEST_3: 14 | 200 15 | 2 16 | 0 17 | 110.4 18 | BEEGEEK_STEPIK_PYTHON 19 | (-90, -3, 0, 1, 3, 4, 10, 11, 23, 56) 20 | [-90, -4, 2, 5, 9, 10, 11] 21 | 22 | # TEST_4: 23 | Аргумент переданного типа не поддерживается 24 | Аргумент переданного типа не поддерживается 25 | Аргумент переданного типа не поддерживается 26 | 27 | -------------------------------------------------------------------------------- /Module_4/Module_4.8/Module_4.8.17/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | print(Negator.neg(11.0)) 5 | print(Negator.neg(-12)) 6 | print(Negator.neg(True)) 7 | print(Negator.neg(False)) 8 | 9 | # TEST_2: 10 | try: 11 | Negator.neg('number') 12 | except TypeError as e: 13 | print(e) 14 | 15 | # TEST_3: 16 | not_supported = [[1, 2, 3], (4, 5, 6), {1: 'one'}, {10, 11, 12}, 'Timothy John «Tim» Berners-Lee'] 17 | 18 | for item in not_supported: 19 | try: 20 | Negator.neg(item) 21 | except TypeError as e: 22 | print(e) 23 | 24 | -------------------------------------------------------------------------------- /Module_4/Module_4.8/Module_4.8.17/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | -11.0 5 | 12 6 | False 7 | True 8 | 9 | # TEST_2: 10 | Аргумент переданного типа не поддерживается 11 | 12 | # TEST_3: 13 | Аргумент переданного типа не поддерживается 14 | Аргумент переданного типа не поддерживается 15 | Аргумент переданного типа не поддерживается 16 | Аргумент переданного типа не поддерживается 17 | Аргумент переданного типа не поддерживается 18 | 19 | -------------------------------------------------------------------------------- /Module_4/Module_4.8/Module_4.8.18/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | Formatter.format(1337) 5 | Formatter.format(20.77) 6 | 7 | # TEST_2: 8 | Formatter.format([10, 20, 30, 40, 50]) 9 | Formatter.format(([1, 3], [2, 4, 6])) 10 | 11 | # TEST_3: 12 | Formatter.format({'Cuphead': 1, 'Mugman': 3}) 13 | Formatter.format({1: 'one', 2: 'two'}) 14 | Formatter.format({1: True, 0: False}) 15 | 16 | # TEST_4: 17 | try: 18 | Formatter.format('All them years, Dutch, for this snake?') 19 | except TypeError as e: 20 | print(e) 21 | 22 | # TEST_5: 23 | not_supported = [str, type, bool, dict, tuple, list] 24 | 25 | for item in not_supported: 26 | try: 27 | Formatter.format(item) 28 | except TypeError as e: 29 | print(e) 30 | 31 | -------------------------------------------------------------------------------- /Module_4/Module_4.8/Module_4.8.18/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | Целое число: 1337 5 | Вещественное число: 20.77 6 | 7 | # TEST_2: 8 | Элементы списка: 10, 20, 30, 40, 50 9 | Элементы кортежа: [1, 3], [2, 4, 6] 10 | 11 | # TEST_3: 12 | Пары словаря: ('Cuphead', 1), ('Mugman', 3) 13 | Пары словаря: (1, 'one'), (2, 'two') 14 | Пары словаря: (1, True), (0, False) 15 | 16 | # TEST_4: 17 | Аргумент переданного типа не поддерживается 18 | 19 | # TEST_5: 20 | Аргумент переданного типа не поддерживается 21 | Аргумент переданного типа не поддерживается 22 | Аргумент переданного типа не поддерживается 23 | Аргумент переданного типа не поддерживается 24 | Аргумент переданного типа не поддерживается 25 | Аргумент переданного типа не поддерживается 26 | 27 | -------------------------------------------------------------------------------- /Module_5/Module_5.1/Module_5.1.15/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | config = Config() 5 | 6 | print(config.program_name) 7 | print(config.environment) 8 | print(config.loglevel) 9 | print(config.version) 10 | 11 | # TEST_2: 12 | config1 = Config() 13 | config2 = Config() 14 | config3 = Config() 15 | 16 | print(config1 is config2) 17 | print(config1 is config3) 18 | 19 | # TEST_3: 20 | config1 = Config() 21 | config2 = Config() 22 | 23 | print(config1.program_name is config2.program_name) 24 | print(config1.environment is config2.environment) 25 | print(config1.loglevel is config2.loglevel) 26 | print(config1.version is config2.version) 27 | 28 | # TEST_4: 29 | config = Config() 30 | configs = [Config() for _ in range(1000)] 31 | print(all(item is config for item in configs)) 32 | 33 | # TEST_5: 34 | config = Config() 35 | print('program_name' in config.__dict__) 36 | print('environment' in config.__dict__) 37 | print('loglevel' in config.__dict__) 38 | print('version' in config.__dict__) 39 | 40 | -------------------------------------------------------------------------------- /Module_5/Module_5.1/Module_5.1.15/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | GenerationPy 5 | release 6 | verbose 7 | 1.0.0 8 | 9 | # TEST_2: 10 | True 11 | True 12 | 13 | # TEST_3: 14 | True 15 | True 16 | True 17 | True 18 | 19 | # TEST_4: 20 | True 21 | 22 | # TEST_5: 23 | True 24 | True 25 | True 26 | True 27 | 28 | -------------------------------------------------------------------------------- /Module_5/Module_5.2/Module_5.2.13/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | book = Book('Изучаем Python', 'Марк Лутц', 2021) 5 | 6 | print(book) 7 | print(repr(book)) 8 | 9 | # TEST_2: 10 | book = Book('Программируем на Python', 'Майкл Доусон', 2023) 11 | 12 | print(str(book)) 13 | print(repr(book)) 14 | 15 | # TEST_3: 16 | books = [Book('Программируем на Python', 'Майкл Доусон', 2023), Book('Чистый Python', 'Дэн Бейдер', 2022), Book('Python. Книга рецептов', 'Бизли и Джонс', 2020)] 17 | 18 | print(repr(books)) 19 | 20 | # TEST_4: 21 | books = [ 22 | Book('Python. К вершинам мастерства', 'Лусиану Рамальо', 2022), 23 | Book('Лёгкий способо выучить Python', 'Зед Шоу', 2019), 24 | Book('Изучаем Python', 'Эрик Мэтиз', 2017), 25 | Book('Python. Экспресс курс', 'Наоми Седер', 2019), 26 | Book('Pandas. Работа с данными', 'Абдрахманов М.И.', 2020), 27 | Book('Python и анализ данных', 'Уэс Маккини', 2020), 28 | Book('Грокаем алгоритмы', 'Адитья Бхаргава', 2017), 29 | ] 30 | 31 | for book in books: 32 | print(book.__str__(), book.__repr__(), sep='\n', end='\n\n') 33 | 34 | -------------------------------------------------------------------------------- /Module_5/Module_5.2/Module_5.2.13/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | Изучаем Python (Марк Лутц, 2021) 5 | Book('Изучаем Python', 'Марк Лутц', 2021) 6 | 7 | # TEST_2: 8 | Программируем на Python (Майкл Доусон, 2023) 9 | Book('Программируем на Python', 'Майкл Доусон', 2023) 10 | 11 | # TEST_3: 12 | [Book('Программируем на Python', 'Майкл Доусон', 2023), Book('Чистый Python', 'Дэн Бейдер', 2022), Book('Python. Книга рецептов', 'Бизли и Джонс', 2020)] 13 | 14 | # TEST_4: 15 | Python. К вершинам мастерства (Лусиану Рамальо, 2022) 16 | Book('Python. К вершинам мастерства', 'Лусиану Рамальо', 2022) 17 | 18 | Лёгкий способо выучить Python (Зед Шоу, 2019) 19 | Book('Лёгкий способо выучить Python', 'Зед Шоу', 2019) 20 | 21 | Изучаем Python (Эрик Мэтиз, 2017) 22 | Book('Изучаем Python', 'Эрик Мэтиз', 2017) 23 | 24 | Python. Экспресс курс (Наоми Седер, 2019) 25 | Book('Python. Экспресс курс', 'Наоми Седер', 2019) 26 | 27 | Pandas. Работа с данными (Абдрахманов М.И., 2020) 28 | Book('Pandas. Работа с данными', 'Абдрахманов М.И.', 2020) 29 | 30 | Python и анализ данных (Уэс Маккини, 2020) 31 | Book('Python и анализ данных', 'Уэс Маккини', 2020) 32 | 33 | Грокаем алгоритмы (Адитья Бхаргава, 2017) 34 | Book('Грокаем алгоритмы', 'Адитья Бхаргава', 2017) 35 | 36 | -------------------------------------------------------------------------------- /Module_5/Module_5.2/Module_5.2.14/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | rectangle = Rectangle(1, 2) 5 | 6 | print(str(rectangle)) 7 | print(repr(rectangle)) 8 | 9 | # TEST_2: 10 | rectangle1 = Rectangle(1, 2) 11 | rectangle2 = Rectangle(3, 4) 12 | 13 | print(rectangle1) 14 | print(repr(rectangle2)) 15 | 16 | # TEST_3: 17 | figures = [Rectangle(1, 2), Rectangle(3, 4)] 18 | 19 | print(figures) 20 | 21 | # TEST_4: 22 | array = [(80, 56), (77, 22), (28, 78), (33, 75), (47, 30), (79, 60), (47, 69), (26, 27), (39, 48), (64, 36)] 23 | for length, width in array: 24 | rectangle = Rectangle(length, width) 25 | print(rectangle, repr(rectangle), sep='\n', end='\n\n') 26 | 27 | -------------------------------------------------------------------------------- /Module_5/Module_5.2/Module_5.2.14/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | Rectangle(1, 2) 5 | Rectangle(1, 2) 6 | 7 | # TEST_2: 8 | Rectangle(1, 2) 9 | Rectangle(3, 4) 10 | 11 | # TEST_3: 12 | [Rectangle(1, 2), Rectangle(3, 4)] 13 | 14 | # TEST_4: 15 | Rectangle(80, 56) 16 | Rectangle(80, 56) 17 | 18 | Rectangle(77, 22) 19 | Rectangle(77, 22) 20 | 21 | Rectangle(28, 78) 22 | Rectangle(28, 78) 23 | 24 | Rectangle(33, 75) 25 | Rectangle(33, 75) 26 | 27 | Rectangle(47, 30) 28 | Rectangle(47, 30) 29 | 30 | Rectangle(79, 60) 31 | Rectangle(79, 60) 32 | 33 | Rectangle(47, 69) 34 | Rectangle(47, 69) 35 | 36 | Rectangle(26, 27) 37 | Rectangle(26, 27) 38 | 39 | Rectangle(39, 48) 40 | Rectangle(39, 48) 41 | 42 | Rectangle(64, 36) 43 | Rectangle(64, 36) 44 | 45 | -------------------------------------------------------------------------------- /Module_5/Module_5.2/Module_5.2.15/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | vector = Vector(1, 2) 5 | 6 | print(str(vector)) 7 | print(repr(vector)) 8 | 9 | # TEST_2: 10 | vectors = [Vector(1, 2), Vector(3, 4)] 11 | 12 | print(vectors) 13 | 14 | # TEST_3: 15 | vectors = [Vector(1, 2), Vector(3, 4), Vector(-1, 1), Vector(0, 0), Vector(-100, -100), Vector(25.5, -10.2), Vector(100.0, 0.5)] 16 | 17 | for vector in vectors: 18 | print(vector) 19 | 20 | # TEST_4: 21 | vectors = [Vector(1, 2), Vector(3, 4), Vector(-1, 1), Vector(0, 0), Vector(-100, -100), Vector(25.5, -10.2), Vector(100.0, 0.5)] 22 | 23 | print(vectors) 24 | 25 | # TEST_5: 26 | array = [(76, 164), (61, 124), (91, 192), (19, 158), (114, 142), (106, 49), (91, 43), (84, 35), (170, 24), (130, 116), 27 | (101, 191), (167, 148), (137, 107), (190, 21), (145, 170), (25, 15), (12, 20), (181, 97), (133, 155), 28 | (132, 195)] 29 | 30 | for x, y in array: 31 | vector = Vector(x, y) 32 | print(repr(vector), vector, sep='; ') 33 | 34 | -------------------------------------------------------------------------------- /Module_5/Module_5.2/Module_5.2.16/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | ip = IPAddress('8.8.1.1') 5 | 6 | print(str(ip)) 7 | print(repr(ip)) 8 | 9 | # TEST_2: 10 | ip = IPAddress([1, 1, 10, 10]) 11 | 12 | print(str(ip)) 13 | print(repr(ip)) 14 | 15 | # TEST_3: 16 | ip = IPAddress((1, 1, 11, 11)) 17 | 18 | print(str(ip)) 19 | print(repr(ip)) 20 | 21 | # TEST_4: 22 | addresses = [(189, 26, 106, 172), '97.248.190.45', '162.149.247.52', (160, 73, 135, 188), (216, 2, 39, 172), 23 | (31, 27, 97, 53), '95.233.16.231', (0, 19, 242, 236), (1, 166, 90, 22), '135.23.153.66', '235.99.24.247', 24 | '217.104.124.203', (99, 138, 21, 145), (231, 214, 91, 158), (158, 87, 228, 213), (32, 248, 59, 101), 25 | '244.236.12.239', '31.201.10.112', '68.206.225.207', '93.212.255.61'] 26 | 27 | for address in addresses: 28 | ip = IPAddress(address) 29 | print(repr(ip)) 30 | 31 | -------------------------------------------------------------------------------- /Module_5/Module_5.2/Module_5.2.16/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 8.8.1.1 5 | IPAddress('8.8.1.1') 6 | 7 | # TEST_2: 8 | 1.1.10.10 9 | IPAddress('1.1.10.10') 10 | 11 | # TEST_3: 12 | 1.1.11.11 13 | IPAddress('1.1.11.11') 14 | 15 | # TEST_4: 16 | IPAddress('189.26.106.172') 17 | IPAddress('97.248.190.45') 18 | IPAddress('162.149.247.52') 19 | IPAddress('160.73.135.188') 20 | IPAddress('216.2.39.172') 21 | IPAddress('31.27.97.53') 22 | IPAddress('95.233.16.231') 23 | IPAddress('0.19.242.236') 24 | IPAddress('1.166.90.22') 25 | IPAddress('135.23.153.66') 26 | IPAddress('235.99.24.247') 27 | IPAddress('217.104.124.203') 28 | IPAddress('99.138.21.145') 29 | IPAddress('231.214.91.158') 30 | IPAddress('158.87.228.213') 31 | IPAddress('32.248.59.101') 32 | IPAddress('244.236.12.239') 33 | IPAddress('31.201.10.112') 34 | IPAddress('68.206.225.207') 35 | IPAddress('93.212.255.61') 36 | 37 | -------------------------------------------------------------------------------- /Module_5/Module_5.2/Module_5.2.18/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | any = AnyClass() 5 | 6 | print(str(any)) 7 | print(repr(any)) 8 | 9 | # TEST_2: 10 | cowboy = AnyClass(name='John', surname='Marston') 11 | 12 | print(str(cowboy)) 13 | print(repr(cowboy)) 14 | 15 | # TEST_3: 16 | obj = AnyClass(attr1=10, attr2='beegeek', attr3=True, attr4=[1, 2, 3], attr5=('one', 'two'), attr6=None) 17 | 18 | print(str(obj)) 19 | print(repr(obj)) 20 | 21 | # TEST_4: 22 | obj1 = AnyClass(name='Gvido', language='Python', age=67) 23 | obj2 = AnyClass(name='Поколение Python', language='Python', age=4, best=True) 24 | 25 | print(obj1, obj2, sep=', ') 26 | print([obj1, obj2]) 27 | print((obj1)) 28 | print((obj2,)) 29 | 30 | # TEST_5: 31 | attrs = { 32 | 'name': 'Margaret Heafield Hamilton', 33 | 'birth_date': '17.09.1936', 34 | 'age': 86, 35 | 'career': 'computer scientist' 36 | } 37 | obj = AnyClass(**attrs) 38 | print(obj) 39 | 40 | # TEST_6: 41 | attrs = { 42 | 'name': 'Guido van Rossum', 43 | 'birth_date': '31.01.1956', 44 | 'age': 67, 45 | 'career': 'python guru' 46 | } 47 | obj = AnyClass(**attrs) 48 | print(obj.name) 49 | print(obj.birth_date) 50 | print(obj.age) 51 | print(obj.career) 52 | 53 | -------------------------------------------------------------------------------- /Module_5/Module_5.2/Module_5.2.18/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | AnyClass: 5 | AnyClass() 6 | 7 | # TEST_2: 8 | AnyClass: name='John', surname='Marston' 9 | AnyClass(name='John', surname='Marston') 10 | 11 | # TEST_3: 12 | AnyClass: attr1=10, attr2='beegeek', attr3=True, attr4=[1, 2, 3], attr5=('one', 'two'), attr6=None 13 | AnyClass(attr1=10, attr2='beegeek', attr3=True, attr4=[1, 2, 3], attr5=('one', 'two'), attr6=None) 14 | 15 | # TEST_4: 16 | AnyClass: name='Gvido', language='Python', age=67, AnyClass: name='Поколение Python', language='Python', age=4, best=True 17 | [AnyClass(name='Gvido', language='Python', age=67), AnyClass(name='Поколение Python', language='Python', age=4, best=True)] 18 | AnyClass: name='Gvido', language='Python', age=67 19 | (AnyClass(name='Поколение Python', language='Python', age=4, best=True),) 20 | 21 | # TEST_5: 22 | AnyClass: name='Margaret Heafield Hamilton', birth_date='17.09.1936', age=86, career='computer scientist' 23 | 24 | # TEST_6: 25 | Guido van Rossum 26 | 31.01.1956 27 | 67 28 | python guru 29 | 30 | -------------------------------------------------------------------------------- /Module_5/Module_5.3/Module_5.3.11/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | False 6 | 7 | # TEST_2: 8 | True 9 | False 10 | False 11 | False 12 | False 13 | 14 | # TEST_3: 15 | True 16 | False 17 | False 18 | 19 | # TEST_4: 20 | False True 21 | False True 22 | False True 23 | True False 24 | False True 25 | True False 26 | True False 27 | False True 28 | False True 29 | False True 30 | 31 | # TEST_5: 32 | False True 33 | False True 34 | True False 35 | False True 36 | False True 37 | True False 38 | False True 39 | False True 40 | False True 41 | True False 42 | 43 | # TEST_6: 44 | False 45 | False 46 | False 47 | False 48 | False 49 | False 50 | 51 | # TEST_7: 52 | [Vector(1, 2), Vector(3, 4), Vector(5, 6)] 53 | 54 | # TEST_8: 55 | NotImplemented 56 | NotImplemented 57 | NotImplemented 58 | NotImplemented 59 | NotImplemented 60 | NotImplemented 61 | 62 | -------------------------------------------------------------------------------- /Module_5/Module_5.4/Module_5.4.11/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | money = Money(100) 5 | 6 | print(money) 7 | print(+money) 8 | print(-money) 9 | 10 | # TEST_2: 11 | money = Money(-100) 12 | 13 | print(money) 14 | print(+money) 15 | print(-money) 16 | 17 | # TEST_3: 18 | money = Money(-100) 19 | 20 | print(type(money)) 21 | print(type(+money)) 22 | print(type(-money)) 23 | 24 | # TEST_4: 25 | money = Money(500) 26 | neg_money = -money 27 | print(neg_money is money) 28 | 29 | # TEST_5: 30 | amounts = [0, -5983, 2205, 3997, 5343, 3346, -733, -2240, -1195, 9823, 8147, -3380, -4802, -8677, 9380, 2013, 8943, 664, 31 | -3161, -8467, -5869, -9562, 9830, -8391, -5780, 4600, 5289, -8634, 7982, 1815, -7881, -8572, -1271, 2881, 32 | -5134, 909, 6641, -480, -581, 7427, 8759, -775, 1363, 9616, -7803, 1412, -9517, -5564, 2177, -1062, 2116, 33 | 5309, 745, 134, 7804, 6195, -1529, -8924, 7449, 9926, -287, -5667, -1853, 924, -6439, 8176, -4671, 1309, 34 | -9027, -3902, 801, 1353, 9358, -3359, -8740, 8195, -6026, -6302, -1786, 7933, 1529, -1244, 1110, -5619, 35 | -4222, 5708, -7069, 4546, 3487, 6162, -5274, -4616, 676, 6636, -5461, -6940, -6921, -6026, -8602, -2027, 36 | -8636] 37 | for amount in amounts: 38 | money = Money(amount) 39 | print('{}; {}'.format(+money, -money)) 40 | 41 | -------------------------------------------------------------------------------- /Module_5/Module_5.5/Module_5.5.21/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 1 -> 2 -> 3 -> 4 -> 5 5 | 1 6 | 2 -> 3 -> 4 -> 5 7 | 8 | # TEST_2: 9 | False 10 | True 11 | 12 | # TEST_3: 13 | 1 -> 2 -> 3 -> 4 -> 5 14 | 15 | # TEST_4: 16 | 1 -> 2 -> 3 -> 4 -> 5 17 | 18 | # TEST_5: 19 | 4 -> 5 20 | 21 | # TEST_6: 22 | 1 -> 2 -> 3 -> 4 -> 5 23 | 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9 -> 10 24 | True 25 | 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9 -> 10 -> 11 -> 12 -> 13 -> 14 -> 15 26 | False 27 | 28 | # TEST_7: 29 | Queue >> 0 = b -> e -> e -> g -> e -> e -> k 30 | Queue >> 1 = e -> e -> g -> e -> e -> k 31 | Queue >> 2 = e -> g -> e -> e -> k 32 | Queue >> 3 = g -> e -> e -> k 33 | Queue >> 4 = e -> e -> k 34 | Queue >> 5 = e -> k 35 | Queue >> 6 = k 36 | Queue >> 7 = 37 | Queue >> 8 = 38 | 39 | # TEST_8: 40 | 1 41 | None 42 | 43 | # TEST_9: 44 | True 45 | False 46 | 47 | # TEST_10: 48 | NotImplemented 49 | NotImplemented 50 | NotImplemented 51 | 52 | -------------------------------------------------------------------------------- /Module_5/Module_5.6/Module_5.6.10/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | raise_to_two = RaiseTo(2) 5 | 6 | print(raise_to_two(2)) 7 | print(raise_to_two(3)) 8 | print(raise_to_two(4)) 9 | 10 | # TEST_2: 11 | raise_to_three = RaiseTo(3) 12 | raise_to_four = RaiseTo(4) 13 | 14 | print(raise_to_three(3)) 15 | print(raise_to_four(2)) 16 | 17 | # TEST_3: 18 | raise_to_ten = RaiseTo(10) 19 | digits = [150, 191, 2, 184, 195, 83, 158, 153, 85, 183, 21, 64, 179, 79, 10, 69, 52, 49, 189, 48, 57, 58, 78, 190, 17, 20 | 118, 90, 104, 53, 129, 86, 159, 11, 121, 136, 146, 61, 18, 31, 113, 200, 59, 176, 97, 169, 91, 173, 12, 162, 21 | 110, 95, 197, 135, 34, 41, 54, 7, 127, 155, 160, 56, 35, 151, 4, 88, 143, 101, 42, 38, 0, 125, 45, 137, 24, 22 | 109, 22, 3, 47, 139, 71, 193, 75, 116, 180, 37, 134, 63, 108, 157, 5, 123, 6, 126, 148, 188, 194, 36, 168, 14, 23 | 107] 24 | 25 | for digit in digits: 26 | print(raise_to_ten(digit)) 27 | 28 | # TEST_4: 29 | raise_to_zero = RaiseTo(0) 30 | raise_to_negativ = RaiseTo(-1) 31 | digits = [124, 215, 515, 2353654, 1247, 54, 2145, 925, 245, 2156, 26] 32 | 33 | for digit in digits: 34 | print(raise_to_zero(digit), raise_to_negativ(digit), sep='; ') 35 | 36 | -------------------------------------------------------------------------------- /Module_5/Module_5.6/Module_5.6.11/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | kingdice = Dice(6) 5 | 6 | print(kingdice() in [1, 2, 3, 4, 5, 6]) 7 | print(kingdice() in [1, 2, 3, 4, 5, 6]) 8 | print(kingdice() in [7, 8, 9, 10]) 9 | 10 | # TEST_2: 11 | kingdice = Dice(2) 12 | 13 | print(kingdice() in [1, 2, 3, 4, 5, 6]) 14 | print(kingdice() in [3, 4]) 15 | print(kingdice() in [7, 8, 9, 10]) 16 | 17 | # TEST_3: 18 | kingdice = Dice(1) 19 | 20 | print(kingdice() == 1) 21 | print(kingdice() in [1, 2]) 22 | print(kingdice() in [3, 4]) 23 | print(kingdice() in [7, 8, 9, 10]) 24 | 25 | # TEST_4: 26 | kingdice = Dice(100) 27 | 28 | for _ in range(100): 29 | print(kingdice() in range(1, 101)) 30 | 31 | # TEST_5: 32 | kingdice = Dice(20) 33 | print(callable(kingdice)) 34 | 35 | -------------------------------------------------------------------------------- /Module_5/Module_5.6/Module_5.6.11/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | True 6 | False 7 | 8 | # TEST_2: 9 | True 10 | False 11 | False 12 | 13 | # TEST_3: 14 | True 15 | True 16 | False 17 | False 18 | 19 | # TEST_4: 20 | True 21 | True 22 | True 23 | True 24 | True 25 | True 26 | True 27 | True 28 | True 29 | True 30 | True 31 | True 32 | True 33 | True 34 | True 35 | True 36 | True 37 | True 38 | True 39 | True 40 | True 41 | True 42 | True 43 | True 44 | True 45 | True 46 | True 47 | True 48 | True 49 | True 50 | True 51 | True 52 | True 53 | True 54 | True 55 | True 56 | True 57 | True 58 | True 59 | True 60 | True 61 | True 62 | True 63 | True 64 | True 65 | True 66 | True 67 | True 68 | True 69 | True 70 | True 71 | True 72 | True 73 | True 74 | True 75 | True 76 | True 77 | True 78 | True 79 | True 80 | True 81 | True 82 | True 83 | True 84 | True 85 | True 86 | True 87 | True 88 | True 89 | True 90 | True 91 | True 92 | True 93 | True 94 | True 95 | True 96 | True 97 | True 98 | True 99 | True 100 | True 101 | True 102 | True 103 | True 104 | True 105 | True 106 | True 107 | True 108 | True 109 | True 110 | True 111 | True 112 | True 113 | True 114 | True 115 | True 116 | True 117 | True 118 | True 119 | True 120 | 121 | # TEST_5: 122 | True 123 | 124 | -------------------------------------------------------------------------------- /Module_5/Module_5.6/Module_5.6.12/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 4 5 | 9 6 | 7 | # TEST_2: 8 | 8 9 | 14 10 | 11 | # TEST_3: 12 | 6844 13 | 2085490 14 | 2721018 15 | 490936 16 | 1353129 17 | 90 18 | 9938 19 | 78106 20 | 159634 21 | 164061 22 | 841268 23 | 168149 24 | 2334239 25 | 6239453 26 | 1770099 27 | 435618 28 | 2410922 29 | 4007118 30 | 2189470 31 | 215986 32 | 601839 33 | 50733 34 | 2672482 35 | 252591 36 | 1635356 37 | 2731501 38 | 564423 39 | 252349 40 | 50509 41 | 5040469 42 | 1259526 43 | 7177615 44 | 6196192 45 | 2159177 46 | 326086 47 | 2282611 48 | 4604058 49 | 16714 50 | 3810 51 | 17245 52 | 227469 53 | 2691334 54 | 5447358 55 | 3324519 56 | 202783 57 | 337195 58 | 3504083 59 | 1887623 60 | 208187 61 | 3201 62 | 1224296 63 | 403848 64 | 88349 65 | 962167 66 | 63240 67 | 39493 68 | 147057 69 | 1306296 70 | 1936329 71 | 8325 72 | 257124 73 | 265495 74 | 3324169 75 | 518505 76 | 1236468 77 | 318162 78 | 82425 79 | 96034 80 | 353381 81 | 70021 82 | 545402 83 | 2251822 84 | 2216494 85 | 164516 86 | 577119 87 | 1641549 88 | 1801636 89 | 2804877 90 | 1166275 91 | 51801 92 | 2185717 93 | 1644632 94 | 289765 95 | 281980 96 | 1622229 97 | 2660380 98 | 98854 99 | 1538825 100 | 34634 101 | 1788518 102 | 869718 103 | 6282048 104 | 317425 105 | 640 106 | 1858780 107 | 1690 108 | 2498294 109 | 2427558 110 | 694740 111 | 497601 112 | 113 | -------------------------------------------------------------------------------- /Module_5/Module_5.6/Module_5.6.13/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | beegeek 5 | bee?geek 6 | 7 | # TEST_2: 8 | --++beegeek 9 | bee...geek 10 | b-e-e-g-e-e-k 11 | 12 | # TEST_3: 13 | gain 14 | bring 15 | fami 16 | pu 17 | eigh 18 | protec 19 | option 20 | response 21 | rise 22 | national 23 | 24 | # TEST_4: 25 | team 26 | language 27 | throughout 28 | dog 29 | wide 30 | director 31 | onto 32 | of 33 | company 34 | run 35 | father 36 | street 37 | enough 38 | young 39 | health 40 | learn 41 | entire 42 | use 43 | first 44 | heavy 45 | argue 46 | mother 47 | owner 48 | new 49 | check 50 | explain 51 | late 52 | movie 53 | card 54 | raise 55 | direction 56 | article 57 | trouble 58 | happen 59 | move 60 | anyone 61 | near 62 | short 63 | really 64 | check 65 | management 66 | boy 67 | or 68 | very 69 | attack 70 | available 71 | sell 72 | executive 73 | up 74 | floor 75 | 76 | -------------------------------------------------------------------------------- /Module_5/Module_5.6/Module_5.6.14/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | [2, 4, 6] 5 | 6 | # TEST_2: 7 | [13, 10, 10, 7] 8 | 9 | # TEST_3: 10 | [1, 'Linus Torvalds', {5, 6, 7}, True] 11 | 12 | # TEST_4: 13 | [5414, 4290, 6206, 9458, 5399, 4927, 3942, 833, 9725, 6794, 7207, 1410, 8225, 5826, 2641, 1114, 9171, 1386, 789, 3799, 9727, 1178, 4307, 7535, 2568, 3882, 1366, 8083, 2171, 2176, 336, 7562, 2021, 3029, 9342, 1903, 4084, 7084, 9659, 5566, 926, 9337, 9166, 4186, 6262, 8594, 212, 3783, 6564, 3130, 3703, 2544, 8801, 7837, 2138, 3125, 1800, 383, 6796, 767] 14 | 15 | # TEST_5: 16 | ['model', 'likely', 'hard', 'reduce', 'visit', 'stuff', 'line', 'from', 'help', 'need', 'small', 'reason', 'year', 'buy', 'case', 'ten', 'fear', 'goal', 'suffer', 'me', 'into', 'health', 'five', 'minute', 'want', 'trip', 'see', 'money', 'still', 'task', 'our', 'beat', 'stay', 'above', 'since', 'front', 'amount', 'will', 'hit', 'state', 'total', 'speak', 'media', 'cut', 'with', 'reveal', 'finish', 'short', 'share', 'new', 'eight', 'worker', 'beyond', 'modern', 'most', 'room', 'a', 'treat', 'break', 'none', 'cup'] 17 | 18 | # TEST_6: 19 | [[], set(), {}, False, ''] 20 | 21 | -------------------------------------------------------------------------------- /Module_5/Module_5.6/Module_5.6.18/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | [User(Arthur, 20), User(Gvido, 67), User(Gvido, 60), User(Timur, 30), User(Timur, 45)] 5 | [User(Arthur, 20), User(Gvido, 60), User(Gvido, 67), User(Timur, 30), User(Timur, 45)] 6 | [User(Arthur, 20), User(Timur, 30), User(Timur, 45), User(Gvido, 60), User(Gvido, 67)] 7 | [User(Arthur, 20), User(Timur, 30), User(Timur, 45), User(Gvido, 60), User(Gvido, 67)] 8 | 9 | # TEST_2: 10 | User(Timur, 30) 11 | User(Gvido, 67) 12 | User(Timur, 45) 13 | User(Gvido, 67) 14 | 15 | # TEST_3: 16 | User(Arthur, 20) 17 | User(Arthur, 20) 18 | User(Arthur, 20) 19 | User(Arthur, 20) 20 | 21 | # TEST_4: 22 | [User(Arthur, 20), User(Gvido, 67), User(Gvido, 60), User(Timur, 30), User(Timur, 45)] 23 | [User(Arthur, 20), User(Gvido, 60), User(Gvido, 67), User(Timur, 30), User(Timur, 45)] 24 | [User(Arthur, 20), User(Timur, 30), User(Timur, 45), User(Gvido, 60), User(Gvido, 67)] 25 | 26 | # TEST_5: 27 | [User(Timur, 30), User(Timur, 45), User(Gvido, 67), User(Gvido, 60), User(Arthur, 20)] 28 | [User(Timur, 45), User(Timur, 30), User(Gvido, 67), User(Gvido, 60), User(Arthur, 20)] 29 | [User(Gvido, 67), User(Gvido, 60), User(Timur, 45), User(Timur, 30), User(Arthur, 20)] 30 | 31 | -------------------------------------------------------------------------------- /Module_5/Module_5.7/Module_5.7.12/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | XII 5 | 12 6 | 7 | # TEST_2: 8 | IV 9 | 4 10 | 11 | # TEST_3: 12 | False 13 | False 14 | True 15 | False 16 | True 17 | 18 | # TEST_4: 19 | True 20 | False 21 | False 22 | True 23 | True 24 | 25 | # TEST_5: 26 | MMCDXLVII 27 | 2447 28 | 29 | # TEST_6: 30 | I 31 | 1 32 | 33 | # TEST_7: 34 | II 2 35 | XV 15 36 | C 100 37 | X 10 38 | XX 20 39 | LXX 70 40 | DLXXII 572 41 | MMMCMLXXXV 3985 42 | 43 | # TEST_8: 44 | I 1 45 | V 5 46 | XL 40 47 | L 50 48 | D 500 49 | XXI 21 50 | LXXXII 82 51 | MCMXLI 1941 52 | 53 | # TEST_9: 54 | I 1 55 | IV 4 56 | IX 9 57 | XII 12 58 | XXV 25 59 | XLV 45 60 | LXIX 69 61 | XC 90 62 | CDXLVIII 448 63 | 64 | # TEST_10: 65 | NotImplemented 66 | NotImplemented 67 | NotImplemented 68 | NotImplemented 69 | NotImplemented 70 | NotImplemented 71 | 72 | -------------------------------------------------------------------------------- /Module_5/Module_5.8/Module_5.8.10/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | obj = Ord() 5 | 6 | print(obj.a) 7 | print(obj.b) 8 | 9 | # TEST_2: 10 | obj = Ord() 11 | 12 | print(obj.в) 13 | print(obj.г) 14 | 15 | # TEST_3: 16 | obj = Ord() 17 | chars = ['|', 'j', 'S', 'g', 'v', 'Y', 'L', 'z', 'a', '3', 'p', '\\', '>', "'", '_', 'I', '!', '=', '#', '(', 'U', 'J', 18 | 'h', 't', '`', '{', 'B', '\n', '&', 'P', 'e', '[', 'i', 'E', 'f', '8', 'V', ':', 'O', 'o', '$', ')', 'l', 'W', 19 | ';', '^', 'K', '?', '7', '}', 'q', ']', 'M', 'C', '9', 'c', 'T', '*', 'y', 's', '\r', '2', 'k', '-', 'Z', '.', 20 | '\t', 'D', '\x0c', '@', '"', '~', '6', '0', ' ', '1', 'b', 'R', '4', 'Q', 'r', 'G', '5', 'u', 'N', '+', 'd', 21 | 'F', 'x', 'A', '<', '/', '%', 'm', ',', 'n', '\x0b', 'X', 'H', 'w'] 22 | 23 | for char in chars: 24 | print(getattr(obj, char)) 25 | 26 | -------------------------------------------------------------------------------- /Module_5/Module_5.8/Module_5.8.10/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 97 5 | 98 6 | 7 | # TEST_2: 8 | 1074 9 | 1075 10 | 11 | # TEST_3: 12 | 124 13 | 106 14 | 83 15 | 103 16 | 118 17 | 89 18 | 76 19 | 122 20 | 97 21 | 51 22 | 112 23 | 92 24 | 62 25 | 39 26 | 95 27 | 73 28 | 33 29 | 61 30 | 35 31 | 40 32 | 85 33 | 74 34 | 104 35 | 116 36 | 96 37 | 123 38 | 66 39 | 10 40 | 38 41 | 80 42 | 101 43 | 91 44 | 105 45 | 69 46 | 102 47 | 56 48 | 86 49 | 58 50 | 79 51 | 111 52 | 36 53 | 41 54 | 108 55 | 87 56 | 59 57 | 94 58 | 75 59 | 63 60 | 55 61 | 125 62 | 113 63 | 93 64 | 77 65 | 67 66 | 57 67 | 99 68 | 84 69 | 42 70 | 121 71 | 115 72 | 13 73 | 50 74 | 107 75 | 45 76 | 90 77 | 46 78 | 9 79 | 68 80 | 12 81 | 64 82 | 34 83 | 126 84 | 54 85 | 48 86 | 32 87 | 49 88 | 98 89 | 82 90 | 52 91 | 81 92 | 114 93 | 71 94 | 53 95 | 117 96 | 78 97 | 43 98 | 100 99 | 70 100 | 120 101 | 65 102 | 60 103 | 47 104 | 37 105 | 109 106 | 44 107 | 110 108 | 11 109 | 88 110 | 72 111 | 119 112 | 113 | -------------------------------------------------------------------------------- /Module_5/Module_5.8/Module_5.8.13/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | music_group = AttrsNumberObject(name='Silent Poets', genre='acid jazz') 5 | 6 | print(music_group.attrs_num) 7 | 8 | # TEST_2: 9 | music_group = AttrsNumberObject() 10 | 11 | print(music_group.attrs_num) 12 | 13 | # TEST_3: 14 | music_group = AttrsNumberObject(name='Woodkid', genre='pop') 15 | 16 | print(music_group.attrs_num) 17 | music_group.country = 'France' 18 | print(music_group.attrs_num) 19 | 20 | # TEST_4: 21 | music_group = AttrsNumberObject(name='Alexandra Savior', genre='dream pop') 22 | 23 | print(music_group.attrs_num) 24 | del music_group.genre 25 | print(music_group.attrs_num) 26 | 27 | # TEST_5: 28 | person = AttrsNumberObject(name='Mark') 29 | 30 | print(person.attrs_num) 31 | 32 | person.surname = 'Zuckerberg' 33 | print(person.attrs_num) 34 | 35 | person.age = 38 36 | print(person.attrs_num) 37 | 38 | person.job = 'Programmer' 39 | print(person.attrs_num) 40 | 41 | # TEST_6: 42 | music_group = AttrsNumberObject(name='Silent Poets', genre='acid jazz') 43 | 44 | print(music_group.attrs_num) 45 | music_group.genre = 'jazz' 46 | print(music_group.attrs_num) 47 | 48 | -------------------------------------------------------------------------------- /Module_5/Module_5.8/Module_5.8.13/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 3 5 | 6 | # TEST_2: 7 | 1 8 | 9 | # TEST_3: 10 | 3 11 | 4 12 | 13 | # TEST_4: 14 | 3 15 | 2 16 | 17 | # TEST_5: 18 | 2 19 | 3 20 | 4 21 | 5 22 | 23 | # TEST_6: 24 | 3 25 | 3 26 | 27 | -------------------------------------------------------------------------------- /Module_5/Module_5.8/Module_5.8.15/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | PG_kamiya 5 | Доступ к защищенному атрибуту невозможен 6 | 7 | # TEST_2: 8 | Доступ к защищенному атрибуту невозможен 9 | 10 | # TEST_3: 11 | Доступ к защищенному атрибуту невозможен 12 | 13 | # TEST_4: 14 | Успешное удаление атрибута 15 | 16 | # TEST_5: 17 | PG_kamiya 18 | alreadybanned 19 | 20 | # TEST_6: 21 | Доступ к защищенному атрибуту невозможен 22 | 23 | # TEST_7: 24 | Доступ к защищенному атрибуту невозможен 25 | 26 | # TEST_8: 27 | Доступ к защищенному атрибуту невозможен 28 | 29 | # TEST_9: 30 | Атрибут отсутствует 31 | 32 | # TEST_10: 33 | Kamiya 34 | PG 35 | 36 | # TEST_11: 37 | Доступ к защищенному атрибуту невозможен 38 | Доступ к защищенному атрибуту невозможен 39 | Доступ к защищенному атрибуту невозможен 40 | 41 | -------------------------------------------------------------------------------- /Module_5/Module_5.8/Module_5.8.8/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 15 5 | 5 6 | 7 | # TEST_2: 8 | Banana 9 | 75 10 | 11 | # TEST_3: 12 | Pygen 13 | 3900 14 | 2 15 | 7800 16 | 17 | # TEST_4: 18 | Обручальное Кольцо 343000 19 | Мобильный Телефон 22000000 20 | Ноутбук 300000000 21 | Ручка Паркер 740000 22 | Статуэтка Оскар 112000000 23 | Наушники 1650000 24 | Гитара 48000000 25 | Золотая Монета 1120000 26 | Фотоаппарат 56880000 27 | Лимитированные Кроссовки 24000000 28 | 29 | # TEST_5: 30 | Морковь 5140 руб. 31 | Лук 2510 руб. 32 | Свекла 1320 руб. 33 | Капуста 560 руб. 34 | Огурцы 435 руб. 35 | Помидоры 369 руб. 36 | Болгарский 384 руб. 37 | Перец 1773 руб. 38 | Яблоки 783 руб. 39 | Груши 1545 руб. 40 | Лимон 1162 руб. 41 | Апельсины 426 руб. 42 | Бананы 923 руб. 43 | Виноград 2470 руб. 44 | Киви 4520 руб. 45 | 46 | -------------------------------------------------------------------------------- /Module_5/Module_5.9/Module_5.9.24/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | print(hash_function('python')) 5 | 6 | # TEST_2: 7 | print(hash_function(12345)) 8 | 9 | # TEST_3: 10 | print(hash_function(None)) 11 | 12 | # TEST_4: 13 | print(hash_function([1, 2, 3, 'python'])) 14 | 15 | # TEST_5: 16 | array = [8022, 530.602391530928, 'lycmfojREEBSKNcNoIjM', False, {'написать': False, 'собеседник': True}, 17 | (1448, True, -3913.85417440914, True), 18 | [True, True, 554, 'FCLRrFheVhkrubirMUts', -33242154218.4859, 885507704053.121]] 19 | 20 | for obj in array: 21 | print(hash_function(obj)) 22 | 23 | -------------------------------------------------------------------------------- /Module_5/Module_5.9/Module_5.9.24/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 111998846 5 | 6 | # TEST_2: 7 | 834432 8 | 9 | # TEST_3: 10 | 119077607 11 | 12 | # TEST_4: 13 | 65774456 14 | 15 | # TEST_5: 16 | 122988791 17 | 113088344 18 | 40794320 19 | 4491585 20 | 109153603 21 | 104092453 22 | 61538724 23 | 24 | -------------------------------------------------------------------------------- /Module_5/Module_5.9/Module_5.9.25/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 10 5 | 11 6 | 15 7 | 8 | # TEST_2: 9 | 10 10 | 11 11 | 15 12 | 10 13 | 11 14 | 15 | # TEST_3: 16 | 15 17 | 14 18 | 10 19 | 15 20 | 14 21 | 22 | # TEST_4: 23 | 3 24 | 2 25 | 3 26 | 2 27 | 3 28 | 2 29 | 3 30 | 31 | # TEST_5: 32 | 13 33 | 15 34 | 14 35 | 11 36 | 12 37 | 11 38 | 14 39 | 40 | -------------------------------------------------------------------------------- /Module_6/Module_6.1/Module_6.1.16/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | beegeek = DevelopmentTeam() 5 | 6 | beegeek.add_junior('Timur') 7 | beegeek.add_junior('Arthur', 'Valery') 8 | beegeek.add_senior('Gvido') 9 | print(*beegeek, sep='\n') 10 | 11 | # TEST_2: 12 | beegeek = DevelopmentTeam() 13 | 14 | print(len(list(beegeek))) 15 | 16 | # TEST_3: 17 | beegeek = DevelopmentTeam() 18 | 19 | beegeek.add_junior('Timur') 20 | beegeek.add_junior('Arthur', 'Valery') 21 | print(*beegeek, sep='\n') 22 | 23 | # TEST_4: 24 | beegeek = DevelopmentTeam() 25 | 26 | beegeek.add_senior('Arthur', 'Valery', 'Timur') 27 | print(*beegeek, sep='\n') 28 | 29 | # TEST_5: 30 | smart_monkey = DevelopmentTeam() 31 | 32 | smart_monkey.add_senior('Gvido', 'Alan') 33 | smart_monkey.add_junior('Denis') 34 | 35 | print(list(smart_monkey)) 36 | 37 | # TEST_6: 38 | pied_piper = DevelopmentTeam() 39 | 40 | pied_piper.add_senior('Richard', 'Gilfoyle', 'Dinesh', 'Erlich') 41 | pied_piper.add_junior('Jared', 'Big Head') 42 | 43 | print(*pied_piper, sep='\n') 44 | print(len(list(pied_piper))) 45 | 46 | -------------------------------------------------------------------------------- /Module_6/Module_6.1/Module_6.1.16/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | ('Timur', 'junior') 5 | ('Arthur', 'junior') 6 | ('Valery', 'junior') 7 | ('Gvido', 'senior') 8 | 9 | # TEST_2: 10 | 0 11 | 12 | # TEST_3: 13 | ('Timur', 'junior') 14 | ('Arthur', 'junior') 15 | ('Valery', 'junior') 16 | 17 | # TEST_4: 18 | ('Arthur', 'senior') 19 | ('Valery', 'senior') 20 | ('Timur', 'senior') 21 | 22 | # TEST_5: 23 | [('Denis', 'junior'), ('Gvido', 'senior'), ('Alan', 'senior')] 24 | 25 | # TEST_6: 26 | ('Jared', 'junior') 27 | ('Big Head', 'junior') 28 | ('Richard', 'senior') 29 | ('Gilfoyle', 'senior') 30 | ('Dinesh', 'senior') 31 | ('Erlich', 'senior') 32 | 6 33 | 34 | -------------------------------------------------------------------------------- /Module_6/Module_6.1/Module_6.1.17/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | ('name', 'Debbie') ('surname', 'Harry') ('age', 77) 5 | 6 | # TEST_2: 7 | ('name', 'Debbie') 8 | ('surname', 'Harry') 9 | ('age', 77) 10 | ('profession', 'singer') 11 | ('height', 160) 12 | 13 | # TEST_3: 14 | ('family', 'cats') 15 | ('breed', 'british') 16 | ('master', 'Kemal') 17 | 18 | # TEST_4: 19 | Атрибуты закончились 20 | 21 | -------------------------------------------------------------------------------- /Module_6/Module_6.1/Module_6.1.18/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 1 3 5 7 9 5 | 6 | # TEST_2: 7 | 1 4 7 10 8 | 9 | # TEST_3: 10 | 1 2 3 4 5 6 7 8 9 10 11 | 12 | # TEST_4: 13 | a b c d 14 | 15 | # TEST_5: 16 | abcd 17 | 18 | # TEST_6: 19 | a 20 | 21 | # TEST_7: 22 | 1 7 23 | 24 | # TEST_8: 25 | aa dd 26 | 27 | # TEST_9: 28 | к о р о л ь и ш у т 29 | 30 | # TEST_10: 31 | 200 32 | 208 33 | 216 34 | 35 | -------------------------------------------------------------------------------- /Module_6/Module_6.1/Module_6.1.20/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | b 5 | e 6 | e g e e k 7 | 8 | # TEST_2: 9 | P 10 | y 11 | y 12 | y 13 | t 14 | t 15 | 16 | # TEST_3: 17 | P y t h o n 18 | None 19 | 20 | # TEST_4: 21 | Пустой итератор 22 | Пустой итератор 23 | 24 | # TEST_5: 25 | 1 26 | [1, 4] 27 | 9 28 | 9 29 | [9, 16] 30 | [25] 31 | 32 | # TEST_6: 33 | 1 34 | 1 4 9 35 | None 36 | 1 37 | [] 38 | () 39 | 40 | # TEST_7: 41 | 1 42 | [1, 2] 43 | 3 44 | [3] 45 | Пустой итератор 46 | 47 | -------------------------------------------------------------------------------- /Module_6/Module_6.1/Module_6.1.21/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 1 5 | [2, 3] 6 | 7 | # TEST_2: 8 | 0 9 | 2 10 | 11 | # TEST_3: 12 | 1 13 | 1 14 | 1 15 | 2 16 | 1 17 | 3 18 | 1 19 | 20 | # TEST_4: 21 | 1 22 | 1 23 | 2 24 | 2 25 | 3 26 | 3 27 | 28 | # TEST_5: 29 | 0 30 | 5 31 | 32 | # TEST_6: 33 | False 34 | False 35 | True 36 | 37 | # TEST_7: 38 | 1 39 | 1 40 | 41 | # TEST_8: 42 | Исходный итерируемый объект пуст 43 | 44 | # TEST_9: 45 | 1 46 | 1 47 | 2 48 | 2 49 | 50 | # TEST_10: 51 | Последнего элемента нет 52 | 53 | # TEST_11: 54 | 1000 55 | 99000 56 | 57 | # TEST_12: 58 | 0 59 | 1 60 | 2 61 | 3 62 | 0 63 | 2 64 | False 65 | 66 | # TEST_13: 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /Module_6/Module_6.2/Module_6.2.10/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | reversed_list = ReversedSequence([1, 2, 3, 4, 5]) 5 | 6 | print(reversed_list[0]) 7 | print(reversed_list[1]) 8 | print(reversed_list[2]) 9 | 10 | # TEST_2: 11 | numbers = [1, 2, 3, 4, 5] 12 | reversed_numbers = ReversedSequence(numbers) 13 | 14 | print(reversed_numbers[0]) 15 | numbers.append(6) 16 | print(reversed_numbers[0]) 17 | 18 | # TEST_3: 19 | numbers = [1, 2, 3, 4, 5] 20 | reversed_numbers = ReversedSequence(numbers) 21 | print(len(reversed_numbers)) 22 | 23 | numbers.append(6) 24 | numbers.append(7) 25 | print(len(reversed_numbers)) 26 | 27 | # TEST_4: 28 | reversed_numbers = ReversedSequence((1, 2, 3, 4, 5)) 29 | 30 | for num in reversed_numbers: 31 | print(num) 32 | 33 | # TEST_5: 34 | reversed_chars = ReversedSequence('abcde') 35 | 36 | for char in reversed_chars: 37 | print(char) 38 | 39 | # TEST_6: 40 | reversed_chars = ReversedSequence('abcdefghijklmnopqrstuvwxyz') 41 | 42 | print(reversed_chars[0], reversed_chars[7], reversed_chars[11], reversed_chars[25]) 43 | 44 | # TEST_7: 45 | reversed_list = ReversedSequence(['Gvido', 'Elon', 'Gates', 'Jobs', 'Zuckerberg']) 46 | 47 | print(*reversed(reversed_list)) 48 | 49 | -------------------------------------------------------------------------------- /Module_6/Module_6.2/Module_6.2.10/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 5 5 | 4 6 | 3 7 | 8 | # TEST_2: 9 | 5 10 | 6 11 | 12 | # TEST_3: 13 | 5 14 | 7 15 | 16 | # TEST_4: 17 | 5 18 | 4 19 | 3 20 | 2 21 | 1 22 | 23 | # TEST_5: 24 | e 25 | d 26 | c 27 | b 28 | a 29 | 30 | # TEST_6: 31 | z s o a 32 | 33 | # TEST_7: 34 | Gvido Elon Gates Jobs Zuckerberg 35 | 36 | -------------------------------------------------------------------------------- /Module_6/Module_6.2/Module_6.2.12/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 1 2 3 1 2 3 1 5 | 6 | # TEST_2: 7 | 4 8 | 3 9 | 1 10 | 2 11 | 12 | # TEST_3: 13 | 2 14 | 3 15 | 3 16 | 1 17 | 18 | # TEST_4: 19 | [4, 1, 2, 2, 1, 5, 4, 2, 1, 1, 5, 5, 4, 3, 1, 1, 5, 1, 2, 4, 3, 4, 5, 5, 2, 2, 1, 3, 3, 5, 4, 5, 3, 5, 3, 3, 1, 5, 2, 2, 5, 4, 2, 1, 5, 4, 1, 3, 2, 4, 1, 4, 1, 4, 3, 3, 5, 1, 5, 5, 2, 5, 1, 3, 3, 3, 3, 3, 5, 5, 1, 4, 1, 5, 2, 4, 1, 2, 2, 2, 5, 5, 4, 5, 1, 1, 3, 4, 4, 5, 5, 3, 5, 1, 3, 4, 1, 1, 1, 1] 20 | 21 | # TEST_5: 22 | 5 23 | 102 24 | 4130 3036 2287 25 | 26 | # TEST_6: 27 | 1 2 3 4 5 1 2 3 4 5 28 | 29 | # TEST_7: 30 | 1 1 1 1 1 1 1 31 | 32 | -------------------------------------------------------------------------------- /Module_6/Module_6.2/Module_6.2.13/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | sequencezip = SequenceZip('ABC', ['bee', 'geek', 'python'], [1, 2, 3]) 5 | 6 | print(list(sequencezip)) 7 | print(tuple(sequencezip)) 8 | 9 | # TEST_2: 10 | sequencezip = SequenceZip('ABC', ['bee', 'geek', 'python'], [1, 2, 3]) 11 | 12 | print(len(sequencezip)) 13 | print(sequencezip[1]) 14 | print(sequencezip[2]) 15 | 16 | # TEST_3: 17 | print(len(SequenceZip([1, 2, 3, 4]))) 18 | print(len(SequenceZip(range(5), [1, 2, 3, 4]))) 19 | print(len(SequenceZip(range(5), [1, 2, 4], 'data'))) 20 | 21 | # TEST_4: 22 | x, y, z = [1, 2, 3], [4, 5, 6], [7, 8, 9] 23 | sequencezip = SequenceZip(x, y, z) 24 | 25 | print(sequencezip[2]) 26 | x[-1], z[-1] = z[-1], x[-1] 27 | print(sequencezip[2]) 28 | 29 | # TEST_5: 30 | many_large_sequences = [range(100000) for _ in range(100)] 31 | sequencezip = SequenceZip(*many_large_sequences) 32 | print(sequencezip[99999]) 33 | 34 | # TEST_6: 35 | sequencezip = SequenceZip() 36 | print(len(sequencezip)) 37 | print(list(sequencezip)) 38 | 39 | # TEST_7: 40 | data1 = [1, 2, 3, 4, 5] 41 | data2 = 'abcde' 42 | 43 | sequencezip = SequenceZip(data1, data2) 44 | data1.extend([6, 7, 8, 9, 10]) 45 | data2 += 'fghij' 46 | 47 | print(data1) 48 | print(data2) 49 | print(len(sequencezip)) 50 | print(list(sequencezip)) 51 | 52 | -------------------------------------------------------------------------------- /Module_6/Module_6.2/Module_6.2.13/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | [('A', 'bee', 1), ('B', 'geek', 2), ('C', 'python', 3)] 5 | (('A', 'bee', 1), ('B', 'geek', 2), ('C', 'python', 3)) 6 | 7 | # TEST_2: 8 | 3 9 | ('B', 'geek', 2) 10 | ('C', 'python', 3) 11 | 12 | # TEST_3: 13 | 4 14 | 4 15 | 3 16 | 17 | # TEST_4: 18 | (3, 6, 9) 19 | (3, 6, 9) 20 | 21 | # TEST_5: 22 | (99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999, 99999) 23 | 24 | # TEST_6: 25 | 0 26 | [] 27 | 28 | # TEST_7: 29 | [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] 30 | abcdefghij 31 | 5 32 | [(1, 'a'), (2, 'b'), (3, 'c'), (4, 'd'), (5, 'e')] 33 | 34 | -------------------------------------------------------------------------------- /Module_6/Module_6.2/Module_6.2.14/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | bee python stepik geek 5 | 4 6 | 7 | # TEST_2: 8 | True 9 | False 10 | 11 | # TEST_3: 12 | green blue red 13 | green red 14 | 15 | # TEST_4: 16 | True 17 | False 18 | True 19 | False 20 | False 21 | 22 | # TEST_5: 23 | 1 24 | 25 | # TEST_6: 26 | True 27 | True 28 | True 29 | True 30 | True 31 | 32 | # TEST_7: 33 | NotImplemented 34 | NotImplemented 35 | 36 | -------------------------------------------------------------------------------- /Module_6/Module_6.2/Module_6.2.17/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | b e e g e e k 5 | beegeek 6 | MutableString('beegeek') 7 | 8 | # TEST_2: 9 | beegeek 10 | BEEGEEK 11 | 12 | # TEST_3: 13 | beegeek 14 | geekbee 15 | 16 | # TEST_4: 17 | beegeek 18 | BeeGeek 19 | 20 | # TEST_5: 21 | egeek 22 | beege 23 | ee 24 | 25 | # TEST_6: 26 | True 27 | 28 | # TEST_7: 29 | False 30 | 31 | # TEST_8: 32 | hello 33 | 34 | # TEST_9: 35 | l 36 | p 37 | Many of you 38 | familiar with the virtues of being a programmer. There are only three of them, 39 | and of course this is: laziness, impatience and pride. Larry Wall 40 | e v r e o eipr 41 | l amatoht m stluM 42 | 43 | # TEST_10: 44 | [MutableString('Разбежавшись'), MutableString('прыгну'), MutableString('со скалы')] 45 | 46 | # TEST_11: 47 | MutableString('') 48 | 49 | # TEST_12: 50 | be 51 | 52 | # TEST_13: 53 | beegeeee 54 | beegeegeek 55 | 56 | # TEST_14: 57 | bgeek 58 | 59 | # TEST_15: 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /Module_6/Module_6.3/Module_6.3.13/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | with open('Precepts_of_Zote.txt', 'w', encoding='utf-8') as file: 5 | file.write('Сражения и путешествия берут своё') 6 | 7 | print_file_content('Precepts_of_Zote.txt') 8 | 9 | # TEST_2: 10 | print_file_content('Precepts_of_Zote2.txt') 11 | 12 | # TEST_3: 13 | with open('Precepts_of_Zote.txt', 'w', encoding='utf-8') as file: 14 | print('Сражения и путешествия берут своё', file=file) 15 | print('Во время отдыха твоё тело становится сильнее, а раны заживают', file=file) 16 | print('Чем больше отдыхаешь, тем сильнее становишься', file=file) 17 | 18 | print_file_content('Precepts_of_Zote.txt') 19 | 20 | # TEST_4: 21 | print_file_content('missing_file.txt') 22 | 23 | # TEST_5: 24 | with open('Precepts_of_Zote.txt', 'w', encoding='utf-8') as file: 25 | file.writelines( 26 | ['Сражения и путешествия берут своё\n', 'Во время отдыха твоё тело становится сильнее, а раны заживают']) 27 | 28 | print_file_content('Precepts_of_Zote.txt') 29 | 30 | -------------------------------------------------------------------------------- /Module_6/Module_6.3/Module_6.3.13/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | Сражения и путешествия берут своё 5 | 6 | # TEST_2: 7 | Файл не найден 8 | 9 | # TEST_3: 10 | Сражения и путешествия берут своё 11 | Во время отдыха твоё тело становится сильнее, а раны заживают 12 | Чем больше отдыхаешь, тем сильнее становишься 13 | 14 | # TEST_4: 15 | Файл не найден 16 | 17 | # TEST_5: 18 | Сражения и путешествия берут своё 19 | Во время отдыха твоё тело становится сильнее, а раны заживают 20 | 21 | -------------------------------------------------------------------------------- /Module_6/Module_6.3/Module_6.3.14/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | i am the first file 5 | i am the third file 6 | 7 | # TEST_2: 8 | Skin mind story market. 9 | Bed best personal enough product. 10 | Standard any simple national play whether whatever. 11 | Population less staff school. 12 | Blue put life. 13 | Which positive can speak. 14 | Become million establish difference left. 15 | Market authority debate decision. 16 | Building card answer need a serve partner. 17 | Minute cover realize before report. 18 | 19 | -------------------------------------------------------------------------------- /Module_6/Module_6.3/Module_6.3.15/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | INFO: User logged in 5 | ERROR: Invalid input data 6 | 7 | # TEST_2: 8 | INFO: User is here 9 | ERROR: User is nub 10 | INFO: Patrick 11 | ERROR: File not found 12 | INFO: Start Beegeek OOP Course 13 | INFO: Goodbye 14 | 15 | -------------------------------------------------------------------------------- /Module_6/Module_6.4/Module_6.4.21/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | 6 | # TEST_2: 7 | True 8 | 9 | # TEST_3: 10 | True 11 | 12 | # TEST_4: 13 | False 14 | False 15 | False 16 | False 17 | False 18 | 19 | # TEST_5: 20 | True 21 | 22 | # TEST_6: 23 | True 24 | 25 | # TEST_7: 26 | False 27 | 28 | # TEST_8: 29 | False 30 | 31 | -------------------------------------------------------------------------------- /Module_6/Module_6.5/Module_6.5.11/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | Завершение программы 5 | 6 | # TEST_2: 7 | invalid literal for int() with base 10: 'я число' 8 | 9 | 10 | # TEST_3: 11 | All success! 12 | None 13 | 14 | # TEST_4: 15 | None 16 | 17 | # TEST_5: 18 | 99 19 | 20 | 21 | 22 | # TEST_6: 23 | 'Mask' 24 | 25 | 26 | # TEST_7: 27 | 28 | None 29 | 30 | # TEST_8: 31 | None 32 | 33 | -------------------------------------------------------------------------------- /Module_6/Module_6.5/Module_6.5.12/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True True 5 | You shall seal the blinding light that plagues their dreams 6 | You are the Vessel 7 | You are the Hollow Knight 8 | You shall seal the blinding light that plagues their dreams 9 | You are the Vessel 10 | You are the Hollow Knight 11 | 12 | # TEST_2: 13 | True 14 | False 15 | 16 | # TEST_3: 17 | False 18 | False 19 | True 20 | 21 | # TEST_4: 22 | False False 23 | True True 24 | 25 | # TEST_5: 26 | Файл закрыт или недоступен для записи 27 | 28 | # TEST_6: 29 | Файл закрыт или недоступен для записи 30 | 31 | # TEST_7: 32 | False 33 | 34 | # TEST_8: 35 | True 36 | 37 | # TEST_9: 38 | False 39 | 40 | -------------------------------------------------------------------------------- /Module_6/Module_6.5/Module_6.5.13/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | [1, 0, 4, 5, 6] 5 | 6 | # TEST_2: 7 | [1, 2, 3, 4, 5] 8 | 9 | # TEST_3: 10 | [[1, 2], [3, 4, 0]] 11 | 12 | # TEST_4: 13 | [[1, 2], [3, 4]] 14 | 15 | # TEST_5: 16 | [1, 2, 3, 4, 5] 17 | [1, 2, 3, 4, 5, 6] 18 | 19 | # TEST_6: 20 | {'firstname': 'Alyson', 'lastname': 'Hannigan', 'birthday': {'day': 24, 'month': 'March', 'year': 1974}} 21 | {'firstname': 'Alyson', 'lastname': 'Hannigan', 'birthday': {'day': 24, 'month': 'April', 'year': 1974}} 22 | 23 | # TEST_7: 24 | {'a': 100, 'z': 333, 'b': 200, 'c': 300, 'd': 45, 'e': 100, 't': 76, 'q': 34, 'f': 90, 'm': 230} 25 | 26 | # TEST_8: 27 | [[1, 2], [3, 4, 0]] 28 | 29 | -------------------------------------------------------------------------------- /Module_6/Module_6.5/Module_6.5.16/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | [] 5 | None 6 | None 7 | None 8 | 9 | # TEST_2: 10 | 1.5 11 | 0.7 12 | 1.0 13 | 14 | # TEST_3: 15 | [1.5, 0.7, 1.0] 16 | 0.7 17 | 1.5 18 | 19 | # TEST_4: 20 | [1.7, 1.3, 0.3, 1.1] 21 | 1.1 22 | 0.3 23 | 1.7 24 | 25 | -------------------------------------------------------------------------------- /Module_6/Module_6.5/Module_6.5.17/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 5 |

6 | Поколение Python 7 |

8 |

9 | Cерия курсов по языку программирования Python от команды BEEGEEK 10 |

11 | 12 | 13 | # TEST_2: 14 | 15 |

Поколение Python

16 |

Cерия курсов по языку программирования Python от команды BEEGEEK

17 | 18 | 19 | # TEST_3: 20 | 21 |

Здесь есть что-то интересное

22 | https://stepik.org/media/attachments/course/98974/watch_me.mp4 23 | 24 | 25 | # TEST_4: 26 |
27 |

28 | Notice: 29 | Your browser is ancient 30 |

31 |
32 | 33 | # TEST_5: 34 | 35 | 36 | 37 | 46 | 47 |
текст заголовка 38 |
    39 |
  • данные
  • 40 |
  • данные
  • 41 |
  • данные
  • 42 |
  • данные
  • 43 |
  • данные
  • 44 |
45 |
48 | 49 | -------------------------------------------------------------------------------- /Module_6/Module_6.5/Module_6.5.18/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | [] 5 | ['1st'] 6 | ['1st', ['2nd', ['3rd'], '4th']] 7 | 8 | # TEST_2: 9 | ['1st', ['2nd', ['3rd', ['4th', ['5th']]]], '6th'] 10 | 11 | # TEST_3: 12 | [[1, 2, [3, [4]], [5]]] 13 | 14 | # TEST_4: 15 | [[1, [2, 3]]] 16 | 17 | # TEST_5: 18 | [0] 19 | [0, [1, [2, 3, [4]]]] 20 | [0, [1, [2, 3, [4]]], [5, [6], [7, [8]]]] 21 | 22 | # TEST_6: 23 | ['root', ['first child', 'second child', ['grandchild'], 'bastard', 'another bastard']] 24 | 25 | # TEST_7: 26 | ['1st', [[[['5th']]]]] 27 | 28 | # TEST_8: 29 | ['1st', ['2nd', ['3rd'], '4th']] 30 | [] 31 | 32 | -------------------------------------------------------------------------------- /Module_6/Module_6.5/Module_6.5.5/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | print('start') 5 | 6 | with SuppressAll(): 7 | print('Python generation!') 8 | raise ValueError 9 | 10 | print('end') 11 | 12 | # TEST_2: 13 | print('start') 14 | 15 | with SuppressAll(): 16 | print('Python generation!') 17 | 18 | print('end') 19 | 20 | # TEST_3: 21 | print('start') 22 | 23 | with SuppressAll(): 24 | print(2077 / 0) 25 | print('Python generation!') 26 | 27 | print('end') 28 | 29 | # TEST_4: 30 | un_ord_me = [1054, 1090, 1074, 1077, 1090, 32, 1085, 1072, 32, 1074, 1086, 1087, 1088, 1086, 1089, 32, 1087, 1086, 1095, 31 | 1077, 1084, 1091, 32, 1042, 1072, 1083, 1077, 1088, 1072, 32, 1090, 1072, 1082, 1086, 1081, 32, 1089, 1091, 32 | 1088, 1086, 1074, 1099, 1081, 32, 1073, 1091, 1076, 1077, 1090, 32, 1074, 32, 1089, 1083, 1077, 1076, 1091, 33 | 1102, 1097, 1077, 1084, 32, 1091, 1088, 1086, 1082, 1077, 46, 32, 1057, 1084, 1086, 1090, 1088, 1080, 32, 34 | 1074, 1085, 1080, 1084, 1072, 1090, 1077, 1083, 1100, 1085, 1086, 33] 35 | 36 | with SuppressAll(): 37 | print(un_ord_me) 38 | raise TypeError 39 | 40 | -------------------------------------------------------------------------------- /Module_6/Module_6.5/Module_6.5.5/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | start 5 | Python generation! 6 | end 7 | 8 | # TEST_2: 9 | start 10 | Python generation! 11 | end 12 | 13 | # TEST_3: 14 | start 15 | end 16 | 17 | # TEST_4: 18 | [1054, 1090, 1074, 1077, 1090, 32, 1085, 1072, 32, 1074, 1086, 1087, 1088, 1086, 1089, 32, 1087, 1086, 1095, 1077, 1084, 1091, 32, 1042, 1072, 1083, 1077, 1088, 1072, 32, 1090, 1072, 1082, 1086, 1081, 32, 1089, 1091, 1088, 1086, 1074, 1099, 1081, 32, 1073, 1091, 1076, 1077, 1090, 32, 1074, 32, 1089, 1083, 1077, 1076, 1091, 1102, 1097, 1077, 1084, 32, 1091, 1088, 1086, 1082, 1077, 46, 32, 1057, 1084, 1086, 1090, 1088, 1080, 32, 1074, 1085, 1080, 1084, 1072, 1090, 1077, 1083, 1100, 1085, 1086, 33] 19 | 20 | -------------------------------------------------------------------------------- /Module_6/Module_6.5/Module_6.5.6/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | with Greeter('Кейв'): 5 | print('...') 6 | 7 | # TEST_2: 8 | with Greeter('Кейв') as greeter: 9 | print(greeter.name) 10 | 11 | # TEST_3: 12 | with Greeter('Матильда') as greeter: 13 | pass 14 | 15 | # TEST_4: 16 | with Greeter('Михаил Г.') as greeter: 17 | print( 18 | '\nКак бессонница в час ночной\n' 19 | 'Меняет, нелюдимая, облик твой,\n' 20 | 'Чьих невольница ты идей?\n' 21 | 'Зачем тебе охотиться на людей?\n' 22 | ) 23 | 24 | # TEST_5: 25 | with Greeter('Gvido') as greeter: 26 | try: 27 | print(greeter.age) 28 | except AttributeError as e: 29 | print(f'Атрибут "{e.name}" отсутствует') 30 | 31 | -------------------------------------------------------------------------------- /Module_6/Module_6.5/Module_6.5.6/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | Приветствую, Кейв! 5 | ... 6 | До встречи, Кейв! 7 | 8 | # TEST_2: 9 | Приветствую, Кейв! 10 | Кейв 11 | До встречи, Кейв! 12 | 13 | # TEST_3: 14 | Приветствую, Матильда! 15 | До встречи, Матильда! 16 | 17 | # TEST_4: 18 | Приветствую, Михаил Г.! 19 | 20 | Как бессонница в час ночной 21 | Меняет, нелюдимая, облик твой, 22 | Чьих невольница ты идей? 23 | Зачем тебе охотиться на людей? 24 | 25 | До встречи, Михаил Г.! 26 | 27 | # TEST_5: 28 | Приветствую, Gvido! 29 | Атрибут "age" отсутствует 30 | До встречи, Gvido! 31 | 32 | -------------------------------------------------------------------------------- /Module_6/Module_6.5/Module_6.5.7/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | output = open('output.txt', 'w', encoding='utf-8') 5 | 6 | with Closer(output) as file: 7 | print(file.closed) 8 | 9 | print(file.closed) 10 | 11 | # TEST_2: 12 | with Closer(5) as i: 13 | i += 1 14 | 15 | print(i) 16 | 17 | # TEST_3: 18 | from zipfile import ZipFile 19 | 20 | zip_file = ZipFile('test.zip', 'w') 21 | 22 | with Closer(zip_file) as zf: 23 | print(zf) 24 | 25 | # TEST_4: 26 | unclosable = [3.14, 'Elon', {'Ч': 'LXXIV'}, [1, 2, 3], (4, 5, 6), True, False] 27 | 28 | for item in unclosable: 29 | with Closer(item) as zf: 30 | print(item) 31 | 32 | -------------------------------------------------------------------------------- /Module_6/Module_6.5/Module_6.5.7/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | False 5 | True 6 | 7 | # TEST_2: 8 | Незакрываемый объект 9 | 6 10 | 11 | # TEST_3: 12 | 13 | 14 | # TEST_4: 15 | 3.14 16 | Незакрываемый объект 17 | Elon 18 | Незакрываемый объект 19 | {'Ч': 'LXXIV'} 20 | Незакрываемый объект 21 | [1, 2, 3] 22 | Незакрываемый объект 23 | (4, 5, 6) 24 | Незакрываемый объект 25 | True 26 | Незакрываемый объект 27 | False 28 | Незакрываемый объект 29 | 30 | -------------------------------------------------------------------------------- /Module_6/Module_6.6/Module_6.6.17/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | with make_tag('---'): 5 | print('Поколение Python') 6 | 7 | # TEST_2: 8 | with make_tag('**********'): 9 | print('Челябинск') 10 | 11 | # TEST_3: 12 | with make_tag('--- Ломтик хлеба ---'): 13 | print('томат | салат | сыр | бекон') 14 | 15 | # TEST_4: 16 | with make_tag('*' * 20), make_tag(' ' * 5 + '-' * 10), make_tag(' ' * 7 + '=' * 6): 17 | print(' ' * 7 + 'привет') 18 | 19 | -------------------------------------------------------------------------------- /Module_6/Module_6.6/Module_6.6.17/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | --- 5 | Поколение Python 6 | --- 7 | 8 | # TEST_2: 9 | ********** 10 | Челябинск 11 | ********** 12 | 13 | # TEST_3: 14 | --- Ломтик хлеба --- 15 | томат | салат | сыр | бекон 16 | --- Ломтик хлеба --- 17 | 18 | # TEST_4: 19 | ******************** 20 | ---------- 21 | ====== 22 | привет 23 | ====== 24 | ---------- 25 | ******************** 26 | 27 | -------------------------------------------------------------------------------- /Module_6/Module_6.6/Module_6.6.19/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | with safe_write('undertale.txt') as file: 5 | file.write('Тень от руин нависает над вами, наполняя вас решительностью') 6 | 7 | with open('undertale.txt') as file: 8 | print(file.read()) 9 | 10 | # TEST_2: 11 | with safe_write('under_tale.txt') as file: 12 | file.write('Тень от руин нависает над вами, наполняя вас решительностью\n') 13 | 14 | with safe_write('under_tale.txt') as file: 15 | print('Под весёлый шорох листвы вы наполняетесь решительностью', file=file, flush=True) 16 | raise ValueError 17 | 18 | with open('under_tale.txt') as file: 19 | print(file.read()) 20 | 21 | # TEST_3: 22 | with safe_write('poem.txt') as file: 23 | print('''Я кашлянул в звенящей тишине, 24 | И от шального эха стало жутко…, 25 | Расскажет ли утятам обо мне, 26 | под утро мной испуганная утка?''', file=file) 27 | 28 | with safe_write('poem.txt') as file: 29 | file.insert('Стихотворение про утку') # неверный метод для записи в файл 30 | 31 | with open('poem.txt') as file: 32 | print(file.read()) 33 | 34 | -------------------------------------------------------------------------------- /Module_6/Module_6.6/Module_6.6.19/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | Тень от руин нависает над вами, наполняя вас решительностью 5 | 6 | # TEST_2: 7 | Во время записи в файл было возбуждено исключение ValueError 8 | Тень от руин нависает над вами, наполняя вас решительностью 9 | 10 | # TEST_3: 11 | Во время записи в файл было возбуждено исключение AttributeError 12 | Я кашлянул в звенящей тишине, 13 | И от шального эха стало жутко…, 14 | Расскажет ли утятам обо мне, 15 | под утро мной испуганная утка? 16 | 17 | -------------------------------------------------------------------------------- /Module_6/Module_6.8/Module_6.8.15/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | Peter 5 | 6 | # TEST_2: 7 | Атрибут не найден 8 | 9 | # TEST_3: 10 | Некорректное значение 11 | 12 | # TEST_4: 13 | Некорректное значение 14 | 15 | # TEST_5: 16 | Некорректное значение 17 | Некорректное значение 18 | Некорректное значение 19 | Некорректное значение 20 | Некорректное значение 21 | Некорректное значение 22 | Некорректное значение 23 | Некорректное значение 24 | Некорректное значение 25 | Некорректное значение 26 | Некорректное значение 27 | Некорректное значение 28 | Некорректное значение 29 | Некорректное значение 30 | Некорректное значение 31 | Некорректное значение 32 | Некорректное значение 33 | Некорректное значение 34 | Некорректное значение 35 | Некорректное значение 36 | Некорректное значение 37 | Некорректное значение 38 | Некорректное значение 39 | Некорректное значение 40 | Некорректное значение 41 | Некорректное значение 42 | Некорректное значение 43 | Некорректное значение 44 | Некорректное значение 45 | Некорректное значение 46 | Некорректное значение 47 | Некорректное значение 48 | Некорректное значение 49 | Некорректное значение 50 | Некорректное значение 51 | 52 | # TEST_6: 53 | 1 54 | 2.3 55 | [4, 5, 6] 56 | (7, 8, 9) 57 | {10: 11, 12: 13, 14: 15} 58 | True 59 | False 60 | Mantrida 61 | 62 | # TEST_7: 63 | 64 | 65 | -------------------------------------------------------------------------------- /Module_6/Module_6.8/Module_6.8.16/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 90 5 | 6 | # TEST_2: 7 | 0 8 | 0 9 | 10 | # TEST_3: 11 | Атрибут не найден 12 | 13 | # TEST_4: 14 | Некорректное значение 15 | 16 | # TEST_5: 17 | Некорректное значение 18 | 19 | # TEST_6: 20 | Некорректное значение 21 | Некорректное значение 22 | Некорректное значение 23 | Некорректное значение 24 | Некорректное значение 25 | Некорректное значение 26 | 27 | # TEST_7: 28 | 29 | 30 | -------------------------------------------------------------------------------- /Module_6/Module_6.8/Module_6.8.17/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | Gwen 5 | Gwen 6 | Gwen 7 | Превышено количество доступных обращений 8 | 9 | # TEST_2: 10 | Gwen 11 | 12 | # TEST_3: 13 | Атрибут не найден 14 | 15 | # TEST_4: 16 | Превышено количество доступных обращений 17 | 18 | # TEST_5: 19 | Gwen 20 | Gwen 21 | Gwen 22 | Превышено количество доступных обращений 23 | Mantrida 24 | Превышено количество доступных обращений 25 | 26 | # TEST_6: 27 | Gwen 28 | Gwen 29 | Gwen 30 | Превышено количество доступных обращений 31 | Stacy 32 | Превышено количество доступных обращений 33 | 34 | # TEST_7: 35 | 36 | 37 | # TEST_8: 38 | Gwen 39 | Gwen 40 | Mary 41 | 42 | -------------------------------------------------------------------------------- /Module_6/Module_6.8/Module_6.8.18/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | Mary 5 | 6 | # TEST_2: 7 | Атрибут не найден 8 | 9 | # TEST_3: 10 | Некорректное значение 11 | Mary 12 | 13 | # TEST_4: 14 | 18 15 | 18.5 16 | 17 | # TEST_5: 18 | Некорректное значение 19 | Некорректное значение 20 | Некорректное значение 21 | Некорректное значение 22 | 1.2 3.4 23 | 24 | # TEST_6: 25 | 26 | 27 | -------------------------------------------------------------------------------- /Module_6/Module_6.8/Module_6.8.19/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | True 6 | True 7 | 8 | # TEST_2: 9 | False 10 | False 11 | False 12 | 13 | # TEST_3: 14 | True 15 | True 16 | True 17 | True 18 | 19 | # TEST_4: 20 | Изменение невозможно 21 | 22 | # TEST_5: 23 | True 24 | True 25 | True 26 | True 27 | True 28 | True 29 | True 30 | True 31 | True 32 | True 33 | True 34 | True 35 | True 36 | True 37 | True 38 | True 39 | True 40 | True 41 | True 42 | True 43 | 44 | # TEST_6: 45 | True 46 | True 47 | True 48 | True 49 | True 50 | True 51 | True 52 | True 53 | True 54 | True 55 | True 56 | True 57 | True 58 | True 59 | True 60 | True 61 | True 62 | True 63 | True 64 | True 65 | True 66 | True 67 | True 68 | True 69 | True 70 | True 71 | True 72 | True 73 | True 74 | True 75 | True 76 | True 77 | True 78 | True 79 | True 80 | True 81 | True 82 | True 83 | True 84 | True 85 | True 86 | True 87 | True 88 | True 89 | True 90 | True 91 | True 92 | True 93 | True 94 | True 95 | 96 | # TEST_7: 97 | Изменение невозможно 98 | 99 | # TEST_8: 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /Module_6/Module_6.8/Module_6.8.20/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 19 5 | 6 | # TEST_2: 7 | 20 8 | 18 9 | 19 10 | 20 11 | 12 | # TEST_3: 13 | 20 14 | 18 15 | 16 | # TEST_4: 17 | Атрибут не найден 18 | 19 | # TEST_5: 20 | 0 21 | 1 22 | 2 23 | 3 24 | 4 25 | 5 26 | 6 27 | 7 28 | 8 29 | 9 30 | 10 31 | 11 32 | 12 33 | 13 34 | 14 35 | 15 36 | 16 37 | 17 38 | 18 39 | 19 40 | 20 41 | 21 42 | 22 43 | 23 44 | 24 45 | 25 46 | 26 47 | 27 48 | 28 49 | 29 50 | 30 51 | 31 52 | 32 53 | 33 54 | 34 55 | 35 56 | 36 57 | 37 58 | 38 59 | 39 60 | 40 61 | 41 62 | 42 63 | 43 64 | 44 65 | 45 66 | 46 67 | 47 68 | 48 69 | 49 70 | 50 71 | 72 | # TEST_6: 73 | 50 74 | 31 75 | 76 | # TEST_7: 77 | 20 78 | 32 79 | 18 80 | 31 81 | 82 | # TEST_8: 83 | 20 84 | 18 85 | 18 86 | 19 87 | 20 88 | 19 89 | 18 90 | 19 91 | 20 92 | 93 | # TEST_9: 94 | 95 | 96 | # TEST_10: 97 | 18 98 | 19 99 | 20 100 | 21 101 | 102 | -------------------------------------------------------------------------------- /Module_7/Module_7.1/Module_7.1.23/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | print(issubclass(LandVehicle, Vehicle)) 5 | print(issubclass(WaterVehicle, Vehicle)) 6 | print(issubclass(AirVehicle, Vehicle)) 7 | 8 | # TEST_2: 9 | print(issubclass(Car, LandVehicle)) 10 | print(issubclass(Motorcycle, LandVehicle)) 11 | print(issubclass(Bicycle, LandVehicle)) 12 | 13 | # TEST_3: 14 | print(issubclass(Propeller, AirVehicle)) 15 | print(issubclass(Jet, AirVehicle)) 16 | 17 | # TEST_4: 18 | print(issubclass(Car, Vehicle)) 19 | print(issubclass(Motorcycle, Vehicle)) 20 | print(issubclass(Bicycle, Vehicle)) 21 | print(issubclass(Propeller, AirVehicle)) 22 | print(issubclass(Jet, AirVehicle)) 23 | 24 | # TEST_5: 25 | print(issubclass(Car, WaterVehicle)) 26 | print(issubclass(Motorcycle, WaterVehicle)) 27 | print(issubclass(Bicycle, WaterVehicle)) 28 | 29 | print(issubclass(Car, AirVehicle)) 30 | print(issubclass(Motorcycle, AirVehicle)) 31 | print(issubclass(Bicycle, AirVehicle)) 32 | 33 | # TEST_6: 34 | print(issubclass(Propeller, LandVehicle)) 35 | print(issubclass(Jet, LandVehicle)) 36 | 37 | print(issubclass(Propeller, WaterVehicle)) 38 | print(issubclass(Jet, WaterVehicle)) 39 | 40 | -------------------------------------------------------------------------------- /Module_7/Module_7.1/Module_7.1.23/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | True 6 | True 7 | 8 | # TEST_2: 9 | True 10 | True 11 | True 12 | 13 | # TEST_3: 14 | True 15 | True 16 | 17 | # TEST_4: 18 | True 19 | True 20 | True 21 | True 22 | True 23 | 24 | # TEST_5: 25 | False 26 | False 27 | False 28 | False 29 | False 30 | False 31 | 32 | # TEST_6: 33 | False 34 | False 35 | False 36 | False 37 | 38 | -------------------------------------------------------------------------------- /Module_7/Module_7.1/Module_7.1.24/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | print(issubclass(Circle, Shape)) 5 | print(issubclass(Polygon, Shape)) 6 | 7 | # TEST_2: 8 | print(issubclass(Triangle, Polygon)) 9 | print(issubclass(IsoscelesTriangle, Triangle)) 10 | print(issubclass(EquilateralTriangle, Triangle)) 11 | 12 | # TEST_3: 13 | print(issubclass(Parallelogram, Quadrilateral)) 14 | print(issubclass(Rectangle, Quadrilateral)) 15 | print(issubclass(Square, Quadrilateral)) 16 | 17 | # TEST_4: 18 | print(issubclass(IsoscelesTriangle, Quadrilateral)) 19 | print(issubclass(EquilateralTriangle, Quadrilateral)) 20 | 21 | print(issubclass(Parallelogram, Triangle)) 22 | print(issubclass(Rectangle, Triangle)) 23 | print(issubclass(Square, Triangle)) 24 | 25 | # TEST_5: 26 | print(issubclass(IsoscelesTriangle, Circle)) 27 | print(issubclass(EquilateralTriangle, Circle)) 28 | 29 | print(issubclass(Parallelogram, Circle)) 30 | print(issubclass(Rectangle, Circle)) 31 | print(issubclass(Square, Circle)) 32 | 33 | # TEST_6: 34 | print(issubclass(Square, Shape)) 35 | print(issubclass(IsoscelesTriangle, Shape)) 36 | print(issubclass(EquilateralTriangle, Shape)) 37 | print(issubclass(Circle, Shape)) 38 | 39 | -------------------------------------------------------------------------------- /Module_7/Module_7.1/Module_7.1.24/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | True 6 | 7 | # TEST_2: 8 | True 9 | True 10 | True 11 | 12 | # TEST_3: 13 | True 14 | True 15 | True 16 | 17 | # TEST_4: 18 | False 19 | False 20 | False 21 | False 22 | False 23 | 24 | # TEST_5: 25 | False 26 | False 27 | False 28 | False 29 | False 30 | 31 | # TEST_6: 32 | True 33 | True 34 | True 35 | True 36 | 37 | -------------------------------------------------------------------------------- /Module_7/Module_7.1/Module_7.1.25/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | print(issubclass(Fish, Animal)) 5 | print(issubclass(Bird, Animal)) 6 | print(issubclass(FlyingBird, Animal)) 7 | print(issubclass(FlyingBird, Bird)) 8 | 9 | # TEST_2: 10 | animal = Animal() 11 | 12 | print(animal.sleep()) 13 | print(animal.eat()) 14 | 15 | # TEST_3: 16 | fish = Fish() 17 | 18 | print(fish.sleep()) 19 | print(fish.eat()) 20 | print(fish.swim()) 21 | 22 | # TEST_4: 23 | bird = Bird() 24 | print(bird.sleep()) 25 | print(bird.eat()) 26 | print(bird.lay_eggs()) 27 | 28 | # TEST_5: 29 | flying_bird = FlyingBird() 30 | print(flying_bird.sleep()) 31 | print(flying_bird.eat()) 32 | print(flying_bird.lay_eggs()) 33 | print(flying_bird.fly()) 34 | 35 | # TEST_6: 36 | animal = Animal() 37 | 38 | methods = ['swim', 'lay_eggs', 'fly'] 39 | for method in methods: 40 | print(hasattr(animal, method)) 41 | 42 | -------------------------------------------------------------------------------- /Module_7/Module_7.1/Module_7.1.25/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | True 6 | True 7 | True 8 | 9 | # TEST_2: 10 | None 11 | None 12 | 13 | # TEST_3: 14 | None 15 | None 16 | None 17 | 18 | # TEST_4: 19 | None 20 | None 21 | None 22 | 23 | # TEST_5: 24 | None 25 | None 26 | None 27 | None 28 | 29 | # TEST_6: 30 | False 31 | False 32 | False 33 | 34 | -------------------------------------------------------------------------------- /Module_7/Module_7.1/Module_7.1.26/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | print(issubclass(PremiumUser, User)) 5 | 6 | # TEST_2: 7 | user = User('Arthur') 8 | premium_user = PremiumUser('Arthur') 9 | 10 | print(user.skip_ads()) 11 | print(premium_user.skip_ads()) 12 | 13 | # TEST_3: 14 | names = ['Наина', 'Татьяна', 'Наркис', 'Наталья', 'Вацлав', 'Пахом', 'Соломон', 'Григорий', 'Жанна', 'Арефий', 'Раиса', 15 | 'Анжелика', 'Евгений', 'Валерия', 'Ия', 'Фрол', 'Милица', 'Ирина', 'Лукьян', 'Никита', 'София', 'Агафья', 16 | 'Рубен', 'Александра', 'Алевтина', 'Нина', 'Касьян', 'Фадей', 'Прасковья', 'Оксана', 'Дементий', 'Анна', 17 | 'Алла', 'Радислав', 'Амос', 'Анатолий', 'Венедикт', 'Аникита'] 18 | 19 | for name in names: 20 | user = User(name) 21 | premium_user = PremiumUser(name) 22 | 23 | print(user.skip_ads()) 24 | print(premium_user.skip_ads()) 25 | 26 | -------------------------------------------------------------------------------- /Module_7/Module_7.1/Module_7.1.26/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | 6 | # TEST_2: 7 | False 8 | True 9 | 10 | # TEST_3: 11 | False 12 | True 13 | False 14 | True 15 | False 16 | True 17 | False 18 | True 19 | False 20 | True 21 | False 22 | True 23 | False 24 | True 25 | False 26 | True 27 | False 28 | True 29 | False 30 | True 31 | False 32 | True 33 | False 34 | True 35 | False 36 | True 37 | False 38 | True 39 | False 40 | True 41 | False 42 | True 43 | False 44 | True 45 | False 46 | True 47 | False 48 | True 49 | False 50 | True 51 | False 52 | True 53 | False 54 | True 55 | False 56 | True 57 | False 58 | True 59 | False 60 | True 61 | False 62 | True 63 | False 64 | True 65 | False 66 | True 67 | False 68 | True 69 | False 70 | True 71 | False 72 | True 73 | False 74 | True 75 | False 76 | True 77 | False 78 | True 79 | False 80 | True 81 | False 82 | True 83 | False 84 | True 85 | False 86 | True 87 | 88 | -------------------------------------------------------------------------------- /Module_7/Module_7.1/Module_7.1.27/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | print(issubclass(NumberValidator, Validator)) 5 | 6 | # TEST_2: 7 | validator1 = Validator('beegeek') 8 | validator2 = Validator(1) 9 | validator3 = Validator(1.1) 10 | 11 | print(validator1.is_valid()) 12 | print(validator2.is_valid()) 13 | print(validator3.is_valid()) 14 | 15 | # TEST_3: 16 | validator1 = NumberValidator('beegeek') 17 | validator2 = NumberValidator(1) 18 | validator3 = NumberValidator(1.1) 19 | 20 | print(validator1.is_valid()) 21 | print(validator2.is_valid()) 22 | print(validator3.is_valid()) 23 | 24 | # TEST_4: 25 | instances = [12, 34.1, [1, 2, 3], {4, 5, 6}, (7, 8, 9), {1: 'one'}, 'this is string'] 26 | 27 | for instance in instances: 28 | validator = NumberValidator(instance) 29 | print(validator.is_valid()) 30 | 31 | -------------------------------------------------------------------------------- /Module_7/Module_7.1/Module_7.1.27/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | 6 | # TEST_2: 7 | None 8 | None 9 | None 10 | 11 | # TEST_3: 12 | False 13 | True 14 | True 15 | 16 | # TEST_4: 17 | True 18 | True 19 | False 20 | False 21 | False 22 | False 23 | False 24 | 25 | -------------------------------------------------------------------------------- /Module_7/Module_7.1/Module_7.1.28/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | True 6 | 7 | # TEST_2: 8 | 0 9 | 6 10 | 2 11 | 0 12 | 13 | # TEST_3: 14 | 10 15 | 21 16 | 21 17 | 21 18 | 19 | # TEST_4: 20 | 0 21 | 5 22 | 2 23 | 10 24 | 25 | # TEST_5: 26 | 0 27 | 5 28 | 2 29 | 20 30 | 31 | # TEST_6: 32 | 5 33 | 10 34 | 7 35 | 30 36 | 37 | # TEST_7: 38 | 427 39 | 40 | # TEST_8: 41 | 3502 42 | 43 | # TEST_9: 44 | 120 45 | 46 | -------------------------------------------------------------------------------- /Module_7/Module_7.2/Module_7.2.16/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | print(BasicPlan.can_stream) 5 | print(BasicPlan.can_download) 6 | print(BasicPlan.has_SD) 7 | print(BasicPlan.has_HD) 8 | print(BasicPlan.has_UHD) 9 | print(BasicPlan.num_of_devices) 10 | print(BasicPlan.price) 11 | 12 | # TEST_2: 13 | print(SilverPlan.can_stream) 14 | print(SilverPlan.can_download) 15 | print(SilverPlan.has_SD) 16 | print(SilverPlan.has_HD) 17 | print(SilverPlan.has_UHD) 18 | print(SilverPlan.num_of_devices) 19 | print(SilverPlan.price) 20 | 21 | # TEST_3: 22 | print(GoldPlan.can_stream) 23 | print(GoldPlan.can_download) 24 | print(GoldPlan.has_SD) 25 | print(GoldPlan.has_HD) 26 | print(GoldPlan.has_UHD) 27 | print(GoldPlan.num_of_devices) 28 | print(GoldPlan.price) 29 | 30 | # TEST_4: 31 | print(issubclass(SilverPlan, BasicPlan)) 32 | print(issubclass(GoldPlan, BasicPlan)) 33 | 34 | -------------------------------------------------------------------------------- /Module_7/Module_7.2/Module_7.2.16/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | True 6 | True 7 | False 8 | False 9 | 1 10 | 8.99$ 11 | 12 | # TEST_2: 13 | True 14 | True 15 | True 16 | True 17 | False 18 | 2 19 | 12.99$ 20 | 21 | # TEST_3: 22 | True 23 | True 24 | True 25 | True 26 | True 27 | 4 28 | 15.99$ 29 | 30 | # TEST_4: 31 | True 32 | True 33 | 34 | -------------------------------------------------------------------------------- /Module_7/Module_7.2/Module_7.2.17/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | print(issubclass(WeatherWarningWithDate, WeatherWarning)) 5 | 6 | # TEST_2: 7 | weatherwarning = WeatherWarning() 8 | 9 | weatherwarning.rain() 10 | weatherwarning.snow() 11 | weatherwarning.low_temperature() 12 | 13 | # TEST_3: 14 | from datetime import date 15 | 16 | weatherwarning = WeatherWarningWithDate() 17 | dt = date(2022, 12, 12) 18 | 19 | weatherwarning.rain(dt) 20 | weatherwarning.snow(dt) 21 | weatherwarning.low_temperature(dt) 22 | 23 | # TEST_4: 24 | from datetime import date 25 | 26 | weatherwarning = WeatherWarningWithDate() 27 | dates = [date(2004, 6, 29), date(2012, 2, 1), date(1973, 2, 1), date(2020, 7, 8), date(2003, 2, 19), date(2022, 12, 25), 28 | date(2012, 8, 24), date(1977, 8, 5), date(2017, 5, 26), date(1976, 1, 8), date(2017, 11, 13), date(1989, 3, 4), 29 | date(1971, 12, 9), date(2011, 11, 13), date(1970, 6, 29), date(1983, 5, 11), date(1984, 8, 9), 30 | date(1999, 6, 15), date(2011, 3, 14), date(1980, 5, 26)] 31 | 32 | for dt in dates: 33 | weatherwarning.rain(dt) 34 | weatherwarning.snow(dt) 35 | weatherwarning.low_temperature(dt) 36 | 37 | 38 | -------------------------------------------------------------------------------- /Module_7/Module_7.2/Module_7.2.18/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | 6 | # TEST_2: 7 | 12 8 | 9 9 | 10 | # TEST_3: 11 | 248 12 | 414 13 | 441 14 | 262 15 | 364 16 | 361 17 | 363 18 | 324 19 | 392 20 | 250 21 | 356 22 | 382 23 | 399 24 | 306 25 | 269 26 | 291 27 | 113 28 | 258 29 | 297 30 | 433 31 | 258 32 | 385 33 | 319 34 | 306 35 | 342 36 | 409 37 | 359 38 | 329 39 | 249 40 | 467 41 | 234 42 | 360 43 | 332 44 | 371 45 | 504 46 | 299 47 | 433 48 | 199 49 | 339 50 | 377 51 | 377 52 | 483 53 | 467 54 | 418 55 | 315 56 | 504 57 | 454 58 | 171 59 | 411 60 | 448 61 | 62 | # TEST_4: 63 | 132 64 | 429 65 | 519 66 | 348 67 | 573 68 | 234 69 | 486 70 | 180 71 | 375 72 | 81 73 | 195 74 | 129 75 | 165 76 | 252 77 | 303 78 | 273 79 | 165 80 | 171 81 | 222 82 | 192 83 | 144 84 | 399 85 | 387 86 | 513 87 | 174 88 | 309 89 | 240 90 | 336 91 | 135 92 | 183 93 | 477 94 | 501 95 | 126 96 | 357 97 | 393 98 | 429 99 | 273 100 | 174 101 | 78 102 | 120 103 | 177 104 | 360 105 | 504 106 | 375 107 | 81 108 | 432 109 | 390 110 | 537 111 | 189 112 | 504 113 | 114 | -------------------------------------------------------------------------------- /Module_7/Module_7.2/Module_7.2.19/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | 6 | # TEST_2: 7 | 10 8 | 16 9 | 5 10 | 0 11 | 12 | # TEST_3: 13 | 20 14 | 32 15 | 10 16 | 0 17 | 18 | # TEST_4: 19 | 365 20 | 21 | # TEST_5: 22 | 190 23 | 24 | -------------------------------------------------------------------------------- /Module_7/Module_7.2/Module_7.2.20/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | print(issubclass(SquareSummator, Summator)) 5 | print(issubclass(QubeSummator, Summator)) 6 | 7 | # TEST_2: 8 | summator1 = Summator() 9 | summator2 = SquareSummator() 10 | summator3 = QubeSummator() 11 | 12 | print(summator1.total(3)) # 1 + 2 + 3 13 | print(summator2.total(3)) # 1 + 4 + 9 14 | print(summator3.total(3)) # 1 + 8 + 27 15 | 16 | # TEST_3: 17 | summator1 = Summator() 18 | summator2 = CustomSummator(2) 19 | summator3 = CustomSummator(3) 20 | 21 | print(summator1.total(3)) # 1 + 2 + 3 22 | print(summator2.total(3)) # 1 + 4 + 9 23 | print(summator3.total(3)) # 1 + 8 + 27 24 | 25 | # TEST_4: 26 | summator1 = Summator() 27 | summator2 = SquareSummator() 28 | summator3 = QubeSummator() 29 | 30 | for i in range(5, 50): 31 | print(summator1.total(i), summator2.total(i), summator3.total(i)) 32 | 33 | # TEST_5: 34 | for i in range(5, 50): 35 | summator = CustomSummator(i) 36 | print(summator.total(10)) 37 | 38 | -------------------------------------------------------------------------------- /Module_7/Module_7.2/Module_7.2.21/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 1 5 | False 6 | {} 7 | 8 | # TEST_2: 9 | 1 10 | 3 11 | True 12 | True 13 | {'x': 1, 'z': 3} 14 | 15 | # TEST_3: 16 | 0 17 | 4 18 | False 19 | False 20 | {} 21 | 22 | # TEST_4: 23 | {} 24 | {'x': 1} 25 | 4 26 | {'x': 1, 'z': 3} 27 | {} 28 | {'y': 2} 29 | 8 30 | {} 31 | {} 32 | 33 | # TEST_5: 34 | False 35 | False 36 | False 37 | True 38 | False 39 | False 40 | True 41 | False 42 | True 43 | False 44 | False 45 | False 46 | False 47 | True 48 | False 49 | False 50 | False 51 | False 52 | 53 | # TEST_6: 54 | 1 55 | 1 56 | 4 57 | 1 58 | 2 59 | 3 60 | 4 61 | 2 62 | 6 63 | 2 64 | 8 65 | 8 66 | 67 | -------------------------------------------------------------------------------- /Module_7/Module_7.3/Module_7.3.15/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | True 6 | True 7 | False 8 | 9 | # TEST_2: 10 | False 11 | True 12 | False 13 | True 14 | True 15 | True 16 | False 17 | False 18 | 19 | # TEST_3: 20 | True 21 | False 22 | True 23 | False 24 | 25 | # TEST_4: 26 | True 27 | 28 | # TEST_5: 29 | True 30 | False 31 | True 32 | True 33 | False 34 | False 35 | 36 | # TEST_6: 37 | NotImplemented 38 | NotImplemented 39 | NotImplemented 40 | NotImplemented 41 | NotImplemented 42 | NotImplemented 43 | 44 | # TEST_7: 45 | True 46 | False 47 | 48 | -------------------------------------------------------------------------------- /Module_7/Module_7.3/Module_7.3.16/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | titled = TitledText('Сreate a class Soda', 'Homework') 5 | 6 | print(titled) 7 | print(titled.title()) 8 | print(issubclass(TitledText, str)) 9 | 10 | # TEST_2: 11 | titled1 = TitledText('Сreate a class Soda', 'Homework') 12 | titled2 = TitledText('Сreate a class Soda', 'Exam') 13 | 14 | print(titled1 == titled2) 15 | 16 | # TEST_3: 17 | headlines = ['Как полностью изменить...', 'Где найти …', 'Быстрый способ...', 'Ошибки, которые приведут тебя к ...', 18 | 'Как быстро...'] 19 | contents = ['Нужно всего лишь...', 'Обратитесь к нам, и мы всё расскажем', 'Для этого Вы должны', 'Не делай их', 20 | 'Ну это вообще просто'] 21 | 22 | for heading, content in zip(headlines, contents): 23 | titledtext = TitledText(content, heading) 24 | print(titledtext.title(), titledtext) 25 | 26 | -------------------------------------------------------------------------------- /Module_7/Module_7.3/Module_7.3.16/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | Сreate a class Soda 5 | Homework 6 | True 7 | 8 | # TEST_2: 9 | True 10 | 11 | # TEST_3: 12 | Как полностью изменить... Нужно всего лишь... 13 | Где найти … Обратитесь к нам, и мы всё расскажем 14 | Быстрый способ... Для этого Вы должны 15 | Ошибки, которые приведут тебя к ... Не делай их 16 | Как быстро... Ну это вообще просто 17 | 18 | -------------------------------------------------------------------------------- /Module_7/Module_7.3/Module_7.3.18/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | print(RoundedInt(7)) 5 | print(RoundedInt(8)) 6 | print(RoundedInt(7, False)) 7 | print(RoundedInt(8, False)) 8 | 9 | # TEST_2: 10 | roundedint1 = RoundedInt(7) 11 | roundedint2 = RoundedInt(7, False) 12 | 13 | print(roundedint1 + roundedint2) 14 | print(roundedint1 + 1) 15 | print(roundedint2 + 1) 16 | 17 | print(type(roundedint1)) 18 | print(type(roundedint2)) 19 | 20 | # TEST_3: 21 | print(issubclass(RoundedInt, int)) 22 | 23 | # TEST_4: 24 | for digit in range(100): 25 | print(RoundedInt(digit)) 26 | 27 | # TEST_5: 28 | for digit in range(100): 29 | print(RoundedInt(digit, False)) 30 | 31 | -------------------------------------------------------------------------------- /Module_7/Module_7.3/Module_7.3.19/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | (1, 2, 3, 4, 5) 5 | (1, 2, 3, 4, 5) 6 | ('a', 'b', 1, 2, 3) 7 | 8 | # TEST_2: 9 | (1, 2, 3, 4, 5, 6, 7, 8) 10 | 11 | 12 | # TEST_3: 13 | (1, 2, 3, 4, 5, 6) (4, 5, 6, 1, 2, 3) 14 | (1, 2, 3, 4, 5, 6) (4, 5, 6, 1, 2, 3) 15 | (1, 2, 3, 4, 5, 6) (4, 5, 6, 1, 2, 3) 16 | (1, 2, 3, '4', '5', '6') ('4', '5', '6', 1, 2, 3) 17 | (1, 2, 3, 4, 5, 6) (1, 2, 3) 18 | (1, 2, 3, 4, 5, 6) (4, 5, 6, 1, 2, 3) 19 | 20 | # TEST_4: 21 | (1, 2, 3, '4', '5', '6', 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22) 22 | 23 | # TEST_5: 24 | (1, 2, 3) 25 | 26 | # TEST_6: 27 | unsupported operand type(s) for +: 'AdvancedTuple' and 'int' 28 | unsupported operand type(s) for +: 'AdvancedTuple' and 'float' 29 | unsupported operand type(s) for +: 'AdvancedTuple' and 'NoneType' 30 | 31 | # TEST_7: 32 | unsupported operand type(s) for +=: 'AdvancedTuple' and 'int' 33 | unsupported operand type(s) for +=: 'AdvancedTuple' and 'float' 34 | unsupported operand type(s) for +=: 'AdvancedTuple' and 'NoneType' 35 | 36 | -------------------------------------------------------------------------------- /Module_7/Module_7.3/Module_7.3.20/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | modulartuple = ModularTuple([101, 102, 103, 104, 105]) 5 | 6 | print(modulartuple) 7 | print(type(modulartuple)) 8 | 9 | # TEST_2: 10 | modulartuple = ModularTuple([1, 2, 3, 4, 5], 2) 11 | 12 | print(modulartuple) 13 | 14 | # TEST_3: 15 | modulartuple = ModularTuple() 16 | print(modulartuple) 17 | 18 | # TEST_4: 19 | modulartuple = ModularTuple([1, 2, 3, 4, 5], 1) 20 | 21 | print(modulartuple) 22 | 23 | # TEST_5: 24 | data = [1, 2, 3, 4, 5] 25 | modulartuple = ModularTuple(data, -5) 26 | 27 | print(modulartuple) 28 | 29 | data.extend([6, 7, 8, 9, 10]) 30 | print(data) 31 | print(modulartuple) 32 | 33 | -------------------------------------------------------------------------------- /Module_7/Module_7.3/Module_7.3.20/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | (1, 2, 3, 4, 5) 5 | 6 | 7 | # TEST_2: 8 | (1, 0, 1, 0, 1) 9 | 10 | # TEST_3: 11 | () 12 | 13 | # TEST_4: 14 | (0, 0, 0, 0, 0) 15 | 16 | # TEST_5: 17 | (-4, -3, -2, -1, 0) 18 | [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] 19 | (-4, -3, -2, -1, 0) 20 | 21 | -------------------------------------------------------------------------------- /Module_7/Module_7.4/Module_7.4.17/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | Timur 5 | Moscow 6 | 7 | # TEST_2: 8 | Dubai 9 | 30 10 | 11 | # TEST_3: 12 | {'name': 'Artur', 'city': 'Almetevsk'} 13 | 14 | # TEST_4: 15 | 30 16 | 33 17 | 31 18 | 44 19 | 23 20 | 21 21 | 46 22 | 23 23 | 22 24 | 37 25 | 26 | -------------------------------------------------------------------------------- /Module_7/Module_7.4/Module_7.4.18/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | twowaydict = TwoWayDict({'apple': 1}) 5 | 6 | twowaydict['banana'] = 2 7 | 8 | print(twowaydict['apple']) 9 | print(twowaydict[1]) 10 | print(twowaydict['banana']) 11 | print(twowaydict[2]) 12 | 13 | # TEST_2: 14 | d = TwoWayDict() 15 | d[3] = 8 16 | d[7] = 6 17 | print(d[3], d[8]) 18 | print(d[7], d[6]) 19 | 20 | d.update({9: 7, 8: 2}) 21 | print(d[9], d[7]) 22 | print(d[8], d[2]) 23 | 24 | # TEST_3: 25 | d = TwoWayDict() 26 | 27 | for i in range(100): 28 | d[i] = i + 100 29 | 30 | print(d) 31 | 32 | # TEST_4: 33 | from string import ascii_uppercase, ascii_lowercase 34 | 35 | d = TwoWayDict() 36 | 37 | for i in range(26): 38 | d[ascii_uppercase[i]] = ascii_lowercase[i] 39 | 40 | print(d) 41 | 42 | -------------------------------------------------------------------------------- /Module_7/Module_7.4/Module_7.4.19/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | advancedlist = AdvancedList([1, 2, 3, 4, 5]) 5 | 6 | print(advancedlist.join()) 7 | print(advancedlist.join('-')) 8 | 9 | # TEST_2: 10 | advancedlist = AdvancedList([1, 2, 3, 4, 5]) 11 | 12 | advancedlist.map(lambda x: -x) 13 | 14 | print(advancedlist) 15 | 16 | # TEST_3: 17 | advancedlist = AdvancedList([1, 2, 3, 4, 5]) 18 | 19 | advancedlist.filter(lambda x: x % 2 == 0) 20 | 21 | print(advancedlist) 22 | 23 | # TEST_4: 24 | advancedlist = AdvancedList([0, 1, 2, '', 3, (), 4, 5, False, {}]) 25 | id1 = id(advancedlist) 26 | 27 | advancedlist.filter(bool) 28 | id2 = id(advancedlist) 29 | 30 | print(advancedlist) 31 | print(id1 == id2) 32 | 33 | # TEST_5: 34 | advancedlist = AdvancedList([1, 2, 3, 4, 5]) 35 | separators = [' - ', ' + ', ' = ', ' * ', ' / ', ' ! ', ' 0 ', ' & ', ' ^ ', ' -> '] 36 | 37 | for separator in separators: 38 | print(advancedlist.join(separator)) 39 | 40 | # TEST_6: 41 | advancedlist = AdvancedList(['hello', 'Gvido', 'how', 'are', 'you']) 42 | advancedlist.map(len) 43 | print(advancedlist) 44 | 45 | -------------------------------------------------------------------------------- /Module_7/Module_7.4/Module_7.4.19/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 1 2 3 4 5 5 | 1-2-3-4-5 6 | 7 | # TEST_2: 8 | [-1, -2, -3, -4, -5] 9 | 10 | # TEST_3: 11 | [2, 4] 12 | 13 | # TEST_4: 14 | [1, 2, 3, 4, 5] 15 | True 16 | 17 | # TEST_5: 18 | 1 - 2 - 3 - 4 - 5 19 | 1 + 2 + 3 + 4 + 5 20 | 1 = 2 = 3 = 4 = 5 21 | 1 * 2 * 3 * 4 * 5 22 | 1 / 2 / 3 / 4 / 5 23 | 1 ! 2 ! 3 ! 4 ! 5 24 | 1 0 2 0 3 0 4 0 5 25 | 1 & 2 & 3 & 4 & 5 26 | 1 ^ 2 ^ 3 ^ 4 ^ 5 27 | 1 -> 2 -> 3 -> 4 -> 5 28 | 29 | # TEST_6: 30 | [5, 5, 3, 3, 3] 31 | 32 | -------------------------------------------------------------------------------- /Module_7/Module_7.4/Module_7.4.20/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | [0, 1, 2, 3, 4, 5] 5 | 6 | # TEST_2: 7 | [0, 1, 2, 3, 4, 5] 8 | 9 | # TEST_3: 10 | Элементами экземпляра класса NumberList должны быть числа 11 | 12 | # TEST_4: 13 | Элементами экземпляра класса NumberList должны быть числа 14 | 15 | # TEST_5: 16 | Элементами экземпляра класса NumberList должны быть числа 17 | 18 | # TEST_6: 19 | Элементами экземпляра класса NumberList должны быть числа 20 | 21 | # TEST_7: 22 | [1, 2, 3] 23 | [1, 2, 3, 4, 5, 6] 24 | [1, 2, 3] 25 | 26 | # TEST_8: 27 | Элементами экземпляра класса NumberList должны быть числа 28 | 29 | # TEST_9: 30 | Элементами экземпляра класса NumberList должны быть числа 31 | 32 | # TEST_10: 33 | Элементами экземпляра класса NumberList должны быть числа 34 | 35 | -------------------------------------------------------------------------------- /Module_7/Module_7.4/Module_7.4.21/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | banana 5 | banana orange 6 | 7 | # TEST_2: 8 | None 9 | 10 | # TEST_3: 11 | None 12 | 13 | # TEST_4: 14 | u 15 | q Q 16 | 17 | # TEST_5: 18 | 0 19 | 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 20 | 21 | -------------------------------------------------------------------------------- /Module_7/Module_7.5/Module_7.5.11/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | user_votes = [99, 90, 71, 1, 1, 100, 56, 60, 80] 5 | expert_votes = [87, 90, 67, 70, 81, 85, 97, 79, 71] 6 | average = Average(user_votes, expert_votes) 7 | 8 | print(average.get_correct_user_votes()) 9 | print(average.get_correct_expert_votes()) 10 | print(average.get_average()) 11 | print(average.get_average(False)) 12 | 13 | # TEST_2: 14 | user_votes = [99, 90, 71, 1, 1, 100, 56, 60, 80] 15 | expert_votes = [87, 90, 67, 70, 81, 85, 97, 79, 71] 16 | median = Median(user_votes, expert_votes) 17 | 18 | print(median.get_correct_user_votes()) 19 | print(median.get_correct_expert_votes()) 20 | print(median.get_average()) 21 | print(median.get_average(False)) 22 | 23 | # TEST_3: 24 | user_votes = [99, 90, 71, 1, 1, 100, 56, 60, 80] 25 | expert_votes = [87, 90, 67, 70, 81, 85, 97, 79, 71] 26 | harmonic = Harmonic(user_votes, expert_votes) 27 | 28 | print(harmonic.get_correct_user_votes()) 29 | print(harmonic.get_correct_expert_votes()) 30 | print(round(harmonic.get_average(), 2)) 31 | print(round(harmonic.get_average(False), 2)) 32 | 33 | # TEST_4: 34 | print(issubclass(Average, Middle)) 35 | print(issubclass(Median, Middle)) 36 | print(issubclass(Harmonic, Middle)) 37 | 38 | # TEST_5: 39 | print(type(Middle)) 40 | 41 | -------------------------------------------------------------------------------- /Module_7/Module_7.5/Module_7.5.11/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | [71, 56, 60, 80] 5 | [87, 90, 67, 70, 81, 85, 79, 71] 6 | 66.75 7 | 78.75 8 | 9 | # TEST_2: 10 | [71, 56, 60, 80] 11 | [87, 90, 67, 70, 81, 85, 79, 71] 12 | 71 13 | 81 14 | 15 | # TEST_3: 16 | [71, 56, 60, 80] 17 | [87, 90, 67, 70, 81, 85, 79, 71] 18 | 65.46 19 | 77.92 20 | 21 | # TEST_4: 22 | True 23 | True 24 | True 25 | 26 | # TEST_5: 27 | 28 | 29 | -------------------------------------------------------------------------------- /Module_7/Module_7.5/Module_7.5.13/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 19 5 | 6 | # TEST_2: 7 | Устанавливаемое значение должно быть числом 8 | 9 | # TEST_3: 10 | Устанавливаемое число должно быть больше или равно 18 11 | 12 | # TEST_4: 13 | Устанавливаемое число должно быть меньше или равно 99 14 | 15 | # TEST_5: 16 | 101 17 | Устанавливаемое число должно быть больше или равно 18 18 | 19 | # TEST_6: 20 | 11 21 | Устанавливаемое число должно быть меньше или равно 100 22 | 23 | # TEST_7: 24 | 18 25 | 99 26 | 27 | # TEST_8: 28 | -1000 29 | 99999 30 | 31 | # TEST_9: 32 | Андрей 33 | Абдурахман 34 | 35 | # TEST_10: 36 | Длина устанавливаемой строки должна быть больше или равна 6 37 | Длина устанавливаемой строки должна быть меньше или равна 10 38 | Устанавливаемое значение должно быть строкой 39 | 40 | # TEST_11: 41 | Устанавливаемая строка не удовлетворяет дополнительным условиям 42 | 43 | # TEST_12: 44 | Пабло Диего Хосе Франциско де Паула Хуан Непомукено Криспин Криспиано де ла Сантисима Тринидад Руиз Пикассо 45 | Длина устанавливаемой строки должна быть больше или равна 6 46 | 47 | # TEST_13: 48 | Ярик 49 | Длина устанавливаемой строки должна быть меньше или равна 10 50 | 51 | # TEST_14: 52 | О 53 | Выквырагтыргыргын Валерий 54 | 55 | # TEST_15: 56 | 0 57 | Устанавливаемое число должно быть больше или равно 0 58 | 59 | # TEST_16: 60 | Атрибут не найден 61 | 62 | # TEST_17: 63 | 64 | 65 | -------------------------------------------------------------------------------- /Module_7/Module_7.5/Module_7.5.22/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | print(is_iterable(123)) 5 | print(is_iterable([1, 2, 3])) 6 | print(is_iterable((1, 2, 3))) 7 | print(is_iterable('123')) 8 | print(is_iterable(iter('123'))) 9 | print(is_iterable(map(int, '123'))) 10 | 11 | # TEST_2: 12 | print(is_iterator(123)) 13 | print(is_iterator([1, 2, 3])) 14 | print(is_iterator((1, 2, 3))) 15 | print(is_iterator('123')) 16 | print(is_iterator(iter('123'))) 17 | print(is_iterator(map(int, '123'))) 18 | 19 | -------------------------------------------------------------------------------- /Module_7/Module_7.5/Module_7.5.22/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | False 5 | True 6 | True 7 | True 8 | True 9 | True 10 | 11 | # TEST_2: 12 | False 13 | False 14 | False 15 | False 16 | True 17 | True 18 | 19 | -------------------------------------------------------------------------------- /Module_7/Module_7.5/Module_7.5.23/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | customrange = CustomRange(1, '2-5', 5, '6-8') 5 | 6 | print(customrange[0]) 7 | print(customrange[1]) 8 | print(customrange[2]) 9 | print(customrange[-1]) 10 | print(customrange[-2]) 11 | print(customrange[-3]) 12 | 13 | # TEST_2: 14 | customrange = CustomRange(1, '2-5', 3, '1-4') 15 | 16 | print(*customrange) 17 | print(*reversed(customrange)) 18 | print(len(customrange)) 19 | print(1 in customrange) 20 | print(10 in customrange) 21 | 22 | # TEST_3: 23 | customrange = CustomRange() 24 | 25 | print(len(customrange)) 26 | print(*customrange) 27 | print(*reversed(customrange)) 28 | 29 | # TEST_4: 30 | customrange = CustomRange('0-1000') 31 | 32 | print(len(customrange)) 33 | print(*customrange) 34 | 35 | # TEST_5: 36 | customrange = CustomRange('0-50', '25-75', '50-100') 37 | 38 | for digit in customrange: 39 | print(digit, end=' ') 40 | 41 | # TEST_6: 42 | customrange = CustomRange(1, 212, '89-323', 87, '17-82', 124, '300-312', 832, 1234) 43 | 44 | print(*customrange) 45 | print(customrange[11]) 46 | print(customrange[44]) 47 | print(customrange[-12]) 48 | print(customrange[-38]) 49 | print(82 in customrange) 50 | print(17 in customrange) 51 | 52 | -------------------------------------------------------------------------------- /Module_7/Module_7.6/Module_7.6.21/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | print(issubclass(E, B)) 5 | print(issubclass(E, C)) 6 | print(issubclass(E, D)) 7 | 8 | # TEST_2: 9 | print(issubclass(B, A)) 10 | print(issubclass(C, A)) 11 | print(issubclass(D, A)) 12 | 13 | # TEST_3: 14 | print(E.mro()) 15 | 16 | # TEST_4: 17 | print(issubclass(E, A)) 18 | 19 | -------------------------------------------------------------------------------- /Module_7/Module_7.6/Module_7.6.21/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | False 6 | True 7 | 8 | # TEST_2: 9 | True 10 | True 11 | True 12 | 13 | # TEST_3: 14 | [, , , , ] 15 | 16 | # TEST_4: 17 | True 18 | 19 | -------------------------------------------------------------------------------- /Module_7/Module_7.6/Module_7.6.22/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | print(issubclass(D, H)) 5 | print(issubclass(E, H)) 6 | print(issubclass(F, H)) 7 | print(issubclass(G, H)) 8 | 9 | # TEST_2: 10 | print(issubclass(B, D)) 11 | print(issubclass(B, E)) 12 | print(issubclass(B, F)) 13 | print(issubclass(B, G)) 14 | 15 | # TEST_3: 16 | print(issubclass(C, D)) 17 | print(issubclass(C, E)) 18 | print(issubclass(C, F)) 19 | print(issubclass(C, G)) 20 | 21 | # TEST_4: 22 | print(A.mro()) 23 | 24 | # TEST_5: 25 | print(issubclass(A, H)) 26 | print(issubclass(B, H)) 27 | print(issubclass(C, H)) 28 | 29 | -------------------------------------------------------------------------------- /Module_7/Module_7.6/Module_7.6.22/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | True 6 | True 7 | True 8 | 9 | # TEST_2: 10 | True 11 | True 12 | False 13 | False 14 | 15 | # TEST_3: 16 | False 17 | False 18 | True 19 | True 20 | 21 | # TEST_4: 22 | [, , , , , , , , ] 23 | 24 | # TEST_5: 25 | True 26 | True 27 | True 28 | 29 | -------------------------------------------------------------------------------- /Module_7/Module_7.6/Module_7.6.23/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 5 | 6 | # TEST_2: 7 | 8 | 9 | # TEST_3: 10 | None 11 | 12 | # TEST_4: 13 | 14 | 15 | # TEST_5: 16 | 17 | 18 | # TEST_6: 19 | 20 | 21 | # TEST_7: 22 | 23 | 24 | # TEST_8: 25 | 26 | 27 | # TEST_9: 28 | None 29 | 30 | -------------------------------------------------------------------------------- /Module_7/Module_7.6/Module_7.6.24/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | father = Father() 5 | mother = Mother() 6 | 7 | print(father.mood) 8 | print(mother.mood) 9 | print(father.greet()) 10 | print(mother.greet()) 11 | 12 | # TEST_2: 13 | father = Father('happy') 14 | mother = Mother('unhappy') 15 | 16 | print(father.mood) 17 | print(mother.mood) 18 | father.be_strict() 19 | mother.be_kind() 20 | print(father.mood) 21 | print(mother.mood) 22 | 23 | # TEST_3: 24 | daughter = Daughter() 25 | 26 | print(daughter.greet()) 27 | print(daughter.mood) 28 | daughter.be_kind() 29 | print(daughter.mood) 30 | daughter.be_strict() 31 | print(daughter.mood) 32 | 33 | # TEST_4: 34 | son = Son() 35 | 36 | print(son.greet()) 37 | print(son.mood) 38 | son.be_kind() 39 | print(son.mood) 40 | son.be_strict() 41 | print(son.mood) 42 | 43 | -------------------------------------------------------------------------------- /Module_7/Module_7.6/Module_7.6.24/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | neutral 5 | neutral 6 | Hello! 7 | Hi, honey! 8 | 9 | # TEST_2: 10 | happy 11 | unhappy 12 | strict 13 | kind 14 | 15 | # TEST_3: 16 | Hi, honey! 17 | neutral 18 | kind 19 | strict 20 | 21 | # TEST_4: 22 | Hello! 23 | neutral 24 | kind 25 | strict 26 | 27 | -------------------------------------------------------------------------------- /Module_7/Module_7.6/Module_7.6.25/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | class A: 5 | pass 6 | 7 | class B(A): 8 | pass 9 | 10 | class C(A): 11 | pass 12 | 13 | class D(B, C): 14 | pass 15 | 16 | print(MROHelper.len(D)) 17 | 18 | # TEST_2: 19 | class A: 20 | pass 21 | 22 | class B(A): 23 | pass 24 | 25 | class C(A): 26 | pass 27 | 28 | class D(B, C): 29 | pass 30 | 31 | print(MROHelper.class_by_index(D, 2)) 32 | print(MROHelper.class_by_index(B)) 33 | 34 | # TEST_3: 35 | class A: 36 | pass 37 | 38 | class B(A): 39 | pass 40 | 41 | class C(A): 42 | pass 43 | 44 | class D(B, C): 45 | pass 46 | 47 | print(MROHelper.index_by_class(D, A)) 48 | 49 | # TEST_4: 50 | class A: 51 | pass 52 | 53 | 54 | class B(A): 55 | pass 56 | 57 | 58 | class C(A): 59 | pass 60 | 61 | 62 | class D(A): 63 | pass 64 | 65 | 66 | class E(B, C, D): 67 | pass 68 | 69 | 70 | class F(B, C): 71 | pass 72 | 73 | 74 | print(MROHelper.len(E)) 75 | print(MROHelper.class_by_index(E, 4)) 76 | print(MROHelper.index_by_class(E, C)) 77 | 78 | -------------------------------------------------------------------------------- /Module_7/Module_7.6/Module_7.6.25/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 5 5 | 6 | # TEST_2: 7 | 8 | 9 | 10 | # TEST_3: 11 | 3 12 | 13 | # TEST_4: 14 | 6 15 | 16 | 2 17 | 18 | -------------------------------------------------------------------------------- /Module_7/Module_7.7/Module_7.7.13/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | death can 5 | have me 6 | when it 7 | earns me 8 | 9 | # TEST_2: 10 | death can 11 | have me 12 | when it 13 | earns me 14 | 15 | # TEST_3: 16 | Multiply noise and joy 17 | Sing songs in a good 18 | hour Friendship grace 19 | and youth Our birthday 20 | girls 21 | Meanwhile the winged 22 | child friends greeting 23 | you Secretly thinks 24 | sometime I will be the 25 | birthday boy 26 | 27 | # TEST_4: 28 | I will not regret the roses 29 | Withered with a light spring 30 | I love the grapes on the 31 | vines Ripened in the hands 32 | under the mountain 33 | The beauty of my green 34 | valley Golden joy of autumn 35 | oblong and transparent Like 36 | the fingers of a young 37 | maiden 38 | 39 | -------------------------------------------------------------------------------- /Module_7/Module_7.8/Module_7.8.10/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | item1 = Item('Yoga Mat', 130) 5 | item2 = Item('Flannel Shirt', 22) 6 | 7 | print(item1) 8 | print(item2) 9 | 10 | # TEST_2: 11 | shopping_cart = ShoppingCart([Item('Yoga Mat', 130)]) 12 | 13 | shopping_cart.add(Item('Flannel Shirt', 22)) 14 | print(shopping_cart) 15 | print(shopping_cart.total()) 16 | 17 | # TEST_3: 18 | shopping_cart = ShoppingCart([Item('Yoga Mat', 130), Item('Flannel Shirt', 22)]) 19 | 20 | shopping_cart.remove('Yoga Mat') 21 | print(shopping_cart) 22 | print(shopping_cart.total()) 23 | 24 | # TEST_4: 25 | shopping_cart = ShoppingCart([Item('Banana', 100), Item('Apple', 120), Item('Orange', 110), Item('Tomato', 180), Item('Cucumber', 150)]) 26 | 27 | shopping_cart.add(Item('Banana', 100)) 28 | print(shopping_cart) 29 | print(shopping_cart.total()) 30 | 31 | shopping_cart.remove('Banana') 32 | print(shopping_cart) 33 | print(shopping_cart.total()) 34 | 35 | # TEST_5: 36 | shopping_cart = ShoppingCart() 37 | print(shopping_cart) 38 | 39 | -------------------------------------------------------------------------------- /Module_7/Module_7.8/Module_7.8.10/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | Yoga Mat, 130$ 5 | Flannel Shirt, 22$ 6 | 7 | # TEST_2: 8 | Yoga Mat, 130$ 9 | Flannel Shirt, 22$ 10 | 152 11 | 12 | # TEST_3: 13 | Flannel Shirt, 22$ 14 | 22 15 | 16 | # TEST_4: 17 | Banana, 100$ 18 | Apple, 120$ 19 | Orange, 110$ 20 | Tomato, 180$ 21 | Cucumber, 150$ 22 | Banana, 100$ 23 | 760 24 | Apple, 120$ 25 | Orange, 110$ 26 | Tomato, 180$ 27 | Cucumber, 150$ 28 | 560 29 | 30 | # TEST_5: 31 | 32 | 33 | -------------------------------------------------------------------------------- /Module_7/Module_7.8/Module_7.8.11/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | print(Card('♣', '4')) 5 | print(Card('♡', 'A')) 6 | print(Card('♢', '10')) 7 | 8 | # TEST_2: 9 | deck = Deck() 10 | 11 | print(deck) 12 | print(deck.deal()) 13 | print(deck.deal()) 14 | print(deck.deal()) 15 | print(type(deck.deal())) 16 | print(deck) 17 | 18 | # TEST_3: 19 | deck = Deck() 20 | 21 | for _ in range(52): 22 | deck.deal() 23 | 24 | try: 25 | deck.deal() 26 | except ValueError as error: 27 | print(error) 28 | 29 | # TEST_4: 30 | deck = Deck() 31 | 32 | deck.deal() 33 | 34 | try: 35 | deck.shuffle() 36 | except ValueError as error: 37 | print(error) 38 | 39 | # TEST_5: 40 | deck = Deck() 41 | 42 | for _ in range(52): 43 | print(deck.deal()) 44 | 45 | # TEST_6: 46 | deck = Deck() 47 | 48 | deck.shuffle() 49 | 50 | for _ in range(52): 51 | print(deck.deal()) 52 | 53 | -------------------------------------------------------------------------------- /Module_7/Module_7.8/Module_7.8.11/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | ♣4 5 | ♡A 6 | ♢10 7 | 8 | # TEST_2: 9 | Карт в колоде: 52 10 | ♠A 11 | ♠K 12 | ♠Q 13 | 14 | Карт в колоде: 48 15 | 16 | # TEST_3: 17 | Все карты разыграны 18 | 19 | # TEST_4: 20 | Перемешивать можно только полную колоду 21 | 22 | # TEST_5: 23 | ♠A 24 | ♠K 25 | ♠Q 26 | ♠J 27 | ♠10 28 | ♠9 29 | ♠8 30 | ♠7 31 | ♠6 32 | ♠5 33 | ♠4 34 | ♠3 35 | ♠2 36 | ♡A 37 | ♡K 38 | ♡Q 39 | ♡J 40 | ♡10 41 | ♡9 42 | ♡8 43 | ♡7 44 | ♡6 45 | ♡5 46 | ♡4 47 | ♡3 48 | ♡2 49 | ♢A 50 | ♢K 51 | ♢Q 52 | ♢J 53 | ♢10 54 | ♢9 55 | ♢8 56 | ♢7 57 | ♢6 58 | ♢5 59 | ♢4 60 | ♢3 61 | ♢2 62 | ♣A 63 | ♣K 64 | ♣Q 65 | ♣J 66 | ♣10 67 | ♣9 68 | ♣8 69 | ♣7 70 | ♣6 71 | ♣5 72 | ♣4 73 | ♣3 74 | ♣2 75 | 76 | # TEST_6: 77 | ♡K 78 | ♣9 79 | ♠Q 80 | ♡4 81 | ♠2 82 | ♠3 83 | ♢3 84 | ♠4 85 | ♡6 86 | ♡Q 87 | ♣Q 88 | ♠K 89 | ♢6 90 | ♠5 91 | ♢4 92 | ♠7 93 | ♡2 94 | ♣K 95 | ♢A 96 | ♠10 97 | ♣5 98 | ♡9 99 | ♢9 100 | ♢10 101 | ♠J 102 | ♡J 103 | ♠9 104 | ♢8 105 | ♢5 106 | ♣2 107 | ♢2 108 | ♡8 109 | ♣10 110 | ♣7 111 | ♢7 112 | ♣A 113 | ♠8 114 | ♣3 115 | ♢Q 116 | ♡A 117 | ♣J 118 | ♠6 119 | ♠A 120 | ♡7 121 | ♡5 122 | ♢J 123 | ♡3 124 | ♢K 125 | ♣4 126 | ♣6 127 | ♡10 128 | ♣8 129 | 130 | -------------------------------------------------------------------------------- /Module_7/Module_7.8/Module_7.8.13/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 05:20 5 | 02:00 6 | 01:30 7 | 8 | # TEST_2: 9 | Провести выступление в это время невозможно 10 | 11 | # TEST_3: 12 | Провести выступление в это время невозможно 13 | 14 | # TEST_4: 15 | 04:00 16 | 00:15 17 | 18 | # TEST_5: 19 | 02:00 20 | 00:30 21 | 22 | # TEST_6: 23 | 00:30 24 | 00:00 25 | 26 | # TEST_7: 27 | Провести выступление в это время невозможно 28 | 29 | # TEST_8: 30 | Провести выступление в это время невозможно 31 | 32 | # TEST_9: 33 | Провести выступление в это время невозможно 34 | 35 | # TEST_10: 36 | Провести выступление в это время невозможно 37 | 38 | # TEST_11: 39 | Провести выступление в это время невозможно 40 | Провести выступление в это время невозможно 41 | Провести выступление в это время невозможно 42 | Провести выступление в это время невозможно 43 | Провести выступление в это время невозможно 44 | Провести выступление в это время невозможно 45 | Провести выступление в это время невозможно 46 | Провести выступление в это время невозможно 47 | Провести выступление в это время невозможно 48 | Провести выступление в это время невозможно 49 | Провести выступление в это время невозможно 50 | Провести выступление в это время невозможно 51 | 52 | # TEST_12: 53 | 03:15 54 | 01:00 55 | 00:15 56 | 57 | # TEST_13: 58 | 02:00 59 | 02:00 60 | 00:00 61 | 62 | -------------------------------------------------------------------------------- /Module_8/Module_8.1/Module_8.1.13/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | triangle 5 | red 6 | 12 7 | 8 | # TEST_2: 9 | Red Square (4) 10 | 11 | # TEST_3: 12 | True 13 | True 14 | 15 | # TEST_4: 16 | Error 17 | 18 | # TEST_5: 19 | Chartreuse rectangle (92) 20 | AliceBlue square (18) 21 | DarkSlateBlue triangle (35) 22 | Silver circle (59) 23 | RosyBrown hexagon (59) 24 | MediumAquaMarine rectangle (64) 25 | LemonChiffon square (50) 26 | LightSalmon triangle (38) 27 | Moccasin circle (26) 28 | Indigo hexagon (58) 29 | DarkViolet rectangle (25) 30 | MediumOrchid square (74) 31 | AntiqueWhite triangle (17) 32 | Peru circle (67) 33 | DarkOliveGreen hexagon (24) 34 | CadetBlue rectangle (20) 35 | Lime square (30) 36 | LightBlue triangle (54) 37 | OrangeRed circle (88) 38 | Yellow hexagon (64) 39 | 40 | # TEST_6: 41 | False 42 | True 43 | 44 | # TEST_7: 45 | False 46 | True 47 | 48 | # TEST_8: 49 | True 50 | False 51 | 52 | # TEST_9: 53 | False 54 | False 55 | False 56 | False 57 | False 58 | False 59 | False 60 | False 61 | False 62 | False 63 | False 64 | False 65 | 66 | # TEST_10: 67 | NotImplemented 68 | NotImplemented 69 | NotImplemented 70 | NotImplemented 71 | NotImplemented 72 | NotImplemented 73 | 74 | -------------------------------------------------------------------------------- /Module_8/Module_8.2/Module_8.2.23/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | print(HTTPStatusCodes.OK.info()) 5 | print(HTTPStatusCodes.OK.code_class()) 6 | 7 | # TEST_2: 8 | print(HTTPStatusCodes.CONTINUE.info()) 9 | print(HTTPStatusCodes.CONTINUE.code_class()) 10 | 11 | # TEST_3: 12 | print(HTTPStatusCodes.USE_PROXY.info()) 13 | print(HTTPStatusCodes.USE_PROXY.code_class()) 14 | 15 | # TEST_4: 16 | print(HTTPStatusCodes.NOT_FOUND.info()) 17 | print(HTTPStatusCodes.NOT_FOUND.code_class()) 18 | 19 | # TEST_5: 20 | print(HTTPStatusCodes.BAD_GATEWAY.info()) 21 | print(HTTPStatusCodes.BAD_GATEWAY.code_class()) 22 | 23 | # TEST_6: 24 | for instance in HTTPStatusCodes: 25 | print(f'{instance.name} -> {instance.value}') 26 | 27 | -------------------------------------------------------------------------------- /Module_8/Module_8.2/Module_8.2.23/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | ('OK', 200) 5 | успех 6 | 7 | # TEST_2: 8 | ('CONTINUE', 100) 9 | информация 10 | 11 | # TEST_3: 12 | ('USE_PROXY', 305) 13 | перенаправление 14 | 15 | # TEST_4: 16 | ('NOT_FOUND', 404) 17 | ошибка клиента 18 | 19 | # TEST_5: 20 | ('BAD_GATEWAY', 502) 21 | ошибка сервера 22 | 23 | # TEST_6: 24 | CONTINUE -> 100 25 | OK -> 200 26 | USE_PROXY -> 305 27 | NOT_FOUND -> 404 28 | BAD_GATEWAY -> 502 29 | 30 | -------------------------------------------------------------------------------- /Module_8/Module_8.2/Module_8.2.24/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | print(Seasons.FALL.text_value('ru')) 5 | print(Seasons.FALL.text_value('en')) 6 | 7 | # TEST_2: 8 | for season in Seasons: 9 | print(season.text_value('en'), '->', season.text_value('ru')) 10 | 11 | # TEST_3: 12 | for season in Seasons: 13 | print(season.name, season.value) 14 | 15 | -------------------------------------------------------------------------------- /Module_8/Module_8.2/Module_8.2.24/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | осень 5 | fall 6 | 7 | # TEST_2: 8 | winter -> зима 9 | spring -> весна 10 | summer -> лето 11 | fall -> осень 12 | 13 | # TEST_3: 14 | WINTER 1 15 | SPRING 2 16 | SUMMER 3 17 | FALL 4 18 | 19 | -------------------------------------------------------------------------------- /Module_8/Module_8.3/Module_8.3.15/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | order_status = OrderStatus(0) 5 | order_status |= OrderStatus.ORDER_PLACED 6 | 7 | if OrderStatus.ORDER_PLACED in order_status: 8 | print('Заказ оформлен!') 9 | 10 | order_status |= OrderStatus.PAYMENT_RECEIVED 11 | 12 | if OrderStatus.PAYMENT_RECEIVED in order_status: 13 | print('Оплата получена!') 14 | 15 | order_status |= OrderStatus.SHIPPING_COMPLETE 16 | 17 | if OrderStatus.SHIPPING_COMPLETE in order_status: 18 | print('Доставка завершена!') 19 | 20 | # TEST_2: 21 | print(OrderStatus.ORDER_PLACED.value) 22 | print(OrderStatus.PAYMENT_RECEIVED.value) 23 | print(OrderStatus.SHIPPING_COMPLETE.value) 24 | 25 | # TEST_3: 26 | for order in OrderStatus: 27 | print(order) 28 | 29 | -------------------------------------------------------------------------------- /Module_8/Module_8.3/Module_8.3.15/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | Заказ оформлен! 5 | Оплата получена! 6 | Доставка завершена! 7 | 8 | # TEST_2: 9 | 1 10 | 2 11 | 4 12 | 13 | # TEST_3: 14 | OrderStatus.ORDER_PLACED 15 | OrderStatus.PAYMENT_RECEIVED 16 | OrderStatus.SHIPPING_COMPLETE 17 | 18 | -------------------------------------------------------------------------------- /Module_8/Module_8.3/Module_8.3.16/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | movie = Movie('The Lord of the Rings', MovieGenres.ACTION | MovieGenres.FANTASY) 5 | 6 | print(movie) 7 | 8 | # TEST_2: 9 | movie = Movie('The Lord of the Rings', MovieGenres.ACTION | MovieGenres.FANTASY) 10 | 11 | print(movie.in_genre(MovieGenres.FANTASY)) 12 | print(movie.in_genre(MovieGenres.COMEDY)) 13 | print(movie.in_genre(MovieGenres.ACTION | MovieGenres.FANTASY)) 14 | 15 | # TEST_3: 16 | movie = Movie('Scary movie', MovieGenres.COMEDY | MovieGenres.HORROR) 17 | 18 | print(movie.in_genre(MovieGenres.FANTASY)) 19 | print(movie.in_genre(MovieGenres.COMEDY)) 20 | print(movie.in_genre(MovieGenres.COMEDY | MovieGenres.HORROR)) 21 | 22 | # TEST_4: 23 | movie = Movie('Avengers', MovieGenres.FANTASY | MovieGenres.ACTION) 24 | 25 | print(movie.in_genre(MovieGenres.DRAMA)) 26 | print(movie.in_genre(MovieGenres.ACTION)) 27 | print(movie.in_genre(MovieGenres.FANTASY | MovieGenres.ACTION)) 28 | print(movie) 29 | 30 | # TEST_5: 31 | movie = Movie('Любовь и голуби', MovieGenres.DRAMA | MovieGenres.COMEDY) 32 | 33 | print(movie.in_genre(MovieGenres.DRAMA)) 34 | print(movie.in_genre(MovieGenres.ACTION)) 35 | print(movie.in_genre(MovieGenres.DRAMA | MovieGenres.COMEDY)) 36 | print(movie) 37 | 38 | -------------------------------------------------------------------------------- /Module_8/Module_8.3/Module_8.3.16/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | The Lord of the Rings 5 | 6 | # TEST_2: 7 | True 8 | False 9 | True 10 | 11 | # TEST_3: 12 | False 13 | True 14 | True 15 | 16 | # TEST_4: 17 | False 18 | True 19 | True 20 | Avengers 21 | 22 | # TEST_5: 23 | True 24 | False 25 | True 26 | Любовь и голуби 27 | 28 | -------------------------------------------------------------------------------- /Module_8/Module_8.4/Module_8.4.10/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 9 5 | 6 | # TEST_2: 7 | meloncherryapple 8 | 9 | # TEST_3: 10 | 14 11 | 12 | # TEST_4: 13 | operation 14 | integer division 15 | 0 16 | 17 | # TEST_5: 18 | ZeroDivisionError 19 | 20 | # TEST_6: 21 | 10 22 | 23 | # TEST_7: 24 | ZeroDivisionError 25 | 26 | # TEST_8: 27 | 50 28 | 29 | # TEST_9: 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Module_8/Module_8.4/Module_8.4.11/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | @limited_calls(3) 5 | def add(a, b): 6 | return a + b 7 | 8 | print(add(1, 2)) 9 | print(add(3, 4)) 10 | print(add(5, 6)) 11 | 12 | try: 13 | print(add()) 14 | except MaxCallsException as e: 15 | print(e) 16 | 17 | # TEST_2: 18 | import random 19 | 20 | 21 | @limited_calls(5) 22 | def positive_sum(*args): 23 | return sum(args) 24 | 25 | 26 | for _ in range(4): 27 | positive_sum(*(random.randint(1, 100) for _ in range(10))) 28 | 29 | print(positive_sum(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) 30 | 31 | try: 32 | print(positive_sum(10, 124, 124, 786, 11)) 33 | except MaxCallsException as e: 34 | print(e) 35 | 36 | # TEST_3: 37 | @limited_calls(5) 38 | def concat(a, b, c): 39 | return a + b + c 40 | 41 | 42 | for _ in range(5): 43 | print(concat('123', '456', '789')) 44 | 45 | try: 46 | print(concat('123', '456', '789')) 47 | except MaxCallsException as e: 48 | print(e) 49 | 50 | # TEST_4: 51 | @limited_calls(10) 52 | def power(a, n): 53 | return a ** n 54 | 55 | 56 | for _ in range(10): 57 | power(2, 3) 58 | 59 | try: 60 | print(power(2, 3)) 61 | except MaxCallsException as e: 62 | print(e) 63 | 64 | # TEST_5: 65 | @limited_calls(10) 66 | def power(a, n): 67 | """degree""" 68 | return a ** n 69 | 70 | 71 | print(power.__name__) 72 | print(power.__doc__) 73 | print(power(2, 3)) 74 | 75 | -------------------------------------------------------------------------------- /Module_8/Module_8.4/Module_8.4.11/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 3 5 | 7 6 | 11 7 | Превышено допустимое количество вызовов 8 | 9 | # TEST_2: 10 | 55 11 | Превышено допустимое количество вызовов 12 | 13 | # TEST_3: 14 | 123456789 15 | 123456789 16 | 123456789 17 | 123456789 18 | 123456789 19 | Превышено допустимое количество вызовов 20 | 21 | # TEST_4: 22 | Превышено допустимое количество вызовов 23 | 24 | # TEST_5: 25 | power 26 | degree 27 | 8 28 | 29 | -------------------------------------------------------------------------------- /Module_8/Module_8.4/Module_8.4.12/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | @takes_numbers 5 | def mul(a, b): 6 | return a * b 7 | 8 | print(mul(1, 2)) 9 | print(mul(1, 2.5)) 10 | print(mul(1.5, 2)) 11 | print(mul(1.5, 2.5)) 12 | 13 | # TEST_2: 14 | @takes_numbers 15 | def mul(a, b): 16 | return a * b 17 | 18 | try: 19 | print(mul(1, '2')) 20 | except TypeError as error: 21 | print(error) 22 | 23 | # TEST_3: 24 | @takes_numbers 25 | def mul(a, b): 26 | return a * b 27 | 28 | try: 29 | print(mul('1', 2)) 30 | except TypeError as error: 31 | print(error) 32 | 33 | # TEST_4: 34 | @takes_numbers 35 | def mul(a, b): 36 | return a * b 37 | 38 | try: 39 | print(mul('1', '2')) 40 | except TypeError as error: 41 | print(error) 42 | 43 | # TEST_5: 44 | @takes_numbers 45 | def mul(a, b=2): 46 | return a * b 47 | 48 | 49 | try: 50 | print(mul(1, b='2')) 51 | except TypeError as error: 52 | print(error) 53 | 54 | # TEST_6: 55 | @takes_numbers 56 | def mul(a, b=2): 57 | """multiplication""" 58 | return a * b 59 | 60 | 61 | print(mul.__name__) 62 | print(mul.__doc__) 63 | print(mul(3, 4)) 64 | 65 | # TEST_7: 66 | print(takes_numbers) 67 | 68 | # TEST_8: 69 | @takes_numbers 70 | def mul(a, b=2): 71 | return a * b 72 | 73 | 74 | print(mul(1, b=2)) 75 | 76 | # TEST_9: 77 | @takes_numbers 78 | def mul(a, b): 79 | return a * b 80 | 81 | print(mul(a=1, b=2)) 82 | 83 | -------------------------------------------------------------------------------- /Module_8/Module_8.4/Module_8.4.12/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 2 5 | 2.5 6 | 3.0 7 | 3.75 8 | 9 | # TEST_2: 10 | Аргументы должны принадлежать типам int или float 11 | 12 | # TEST_3: 13 | Аргументы должны принадлежать типам int или float 14 | 15 | # TEST_4: 16 | Аргументы должны принадлежать типам int или float 17 | 18 | # TEST_5: 19 | Аргументы должны принадлежать типам int или float 20 | 21 | # TEST_6: 22 | mul 23 | multiplication 24 | 12 25 | 26 | # TEST_7: 27 | 28 | 29 | # TEST_8: 30 | 2 31 | 32 | # TEST_9: 33 | 2 34 | 35 | -------------------------------------------------------------------------------- /Module_8/Module_8.4/Module_8.4.13/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | @returns(int) 5 | def add(a, b): 6 | return a + b 7 | 8 | print(add(1, 2)) 9 | 10 | # TEST_2: 11 | @returns(int) 12 | def add(a, b): 13 | return a + b 14 | 15 | try: 16 | print(add('1', '2')) 17 | except Exception as error: 18 | print(type(error)) 19 | 20 | # TEST_3: 21 | @returns(list) 22 | def beegeek(): 23 | '''beegeek docs''' 24 | return 'beegeek' 25 | 26 | print(beegeek.__name__) 27 | print(beegeek.__doc__) 28 | 29 | try: 30 | print(beegeek()) 31 | except TypeError as e: 32 | print(type(e)) 33 | 34 | # TEST_4: 35 | @returns(list) 36 | def append_this(li, elem): 37 | '''append_this docs''' 38 | return li + [elem] 39 | 40 | print(append_this.__name__) 41 | print(append_this.__doc__) 42 | print(append_this([1, 2, 3], elem=4)) 43 | 44 | # TEST_5: 45 | @returns(tuple) 46 | def append_this(li, elem): 47 | '''append_this docs''' 48 | return li + [elem] 49 | 50 | print(append_this.__name__) 51 | print(append_this.__doc__) 52 | 53 | try: 54 | print(append_this([1, 2, 3], [4, 5, 6])) 55 | except TypeError as e: 56 | print(type(e)) 57 | 58 | # TEST_6: 59 | @returns(int) 60 | def add(a, b): 61 | return a + b 62 | 63 | print(add(a=10, b=5)) 64 | 65 | -------------------------------------------------------------------------------- /Module_8/Module_8.4/Module_8.4.13/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 3 5 | 6 | # TEST_2: 7 | 8 | 9 | # TEST_3: 10 | beegeek 11 | beegeek docs 12 | 13 | 14 | # TEST_4: 15 | append_this 16 | append_this docs 17 | [1, 2, 3, 4] 18 | 19 | # TEST_5: 20 | append_this 21 | append_this docs 22 | 23 | 24 | # TEST_6: 25 | 15 26 | 27 | -------------------------------------------------------------------------------- /Module_8/Module_8.4/Module_8.4.14/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | @exception_decorator 5 | def func(x): 6 | return 2*x + 1 7 | 8 | print(func(1)) 9 | print(func('bee')) 10 | 11 | # TEST_2: 12 | @exception_decorator 13 | def f(x, y): 14 | return x * y 15 | 16 | print(f('stepik', 10)) 17 | 18 | # TEST_3: 19 | @exception_decorator 20 | def f(x, y): 21 | return x * y 22 | 23 | print(f('stepik', 'stepik')) 24 | 25 | # TEST_4: 26 | @exception_decorator 27 | def f(*args, **kwargs): 28 | return sum(args) + sum(kwargs.values()) 29 | 30 | print(f(1, 2, 3, param1=4, param2=10)) 31 | 32 | # TEST_5: 33 | @exception_decorator 34 | def f(*args, **kwargs): 35 | """sum args and kwargs""" 36 | return sum(args) + sum(kwargs.values()) 37 | 38 | 39 | print(f.__name__) 40 | print(f.__doc__) 41 | print(f(1, 2, 3, param1=4, param2='10')) 42 | 43 | # TEST_6: 44 | sum = exception_decorator(sum) 45 | 46 | print(sum(['199', '1', 187])) 47 | 48 | -------------------------------------------------------------------------------- /Module_8/Module_8.4/Module_8.4.14/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | (3, None) 5 | (None, ) 6 | 7 | # TEST_2: 8 | ('stepikstepikstepikstepikstepikstepikstepikstepikstepikstepik', None) 9 | 10 | # TEST_3: 11 | (None, ) 12 | 13 | # TEST_4: 14 | (20, None) 15 | 16 | # TEST_5: 17 | f 18 | sum args and kwargs 19 | (None, ) 20 | 21 | # TEST_6: 22 | (None, ) 23 | 24 | -------------------------------------------------------------------------------- /Module_8/Module_8.4/Module_8.4.15/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | Исключение ZeroDivisionError обработано 5 | 6 | # TEST_2: 7 | 8 | 9 | # TEST_3: 10 | 11 | 12 | # TEST_4: 13 | 14 | 15 | # TEST_5: 16 | Исключение NameError обработано 17 | 18 | # TEST_6: 19 | Исключение ZeroDivisionError обработано 20 | 21 | # TEST_7: 22 | Исключение NameError обработано 23 | 24 | # TEST_8: 25 | beegeek 26 | beegeek 27 | beegeek 28 | 29 | -------------------------------------------------------------------------------- /Module_8/Module_8.4/Module_8.4.16/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | @type_check([int, int]) 5 | def add(a, b): 6 | return a + b 7 | 8 | print(add(1, 2)) 9 | 10 | # TEST_2: 11 | @type_check([int, int]) 12 | def add(a, b): 13 | return a + b 14 | 15 | try: 16 | print(add(1, '2')) 17 | except Exception as error: 18 | print(type(error)) 19 | 20 | # TEST_3: 21 | @type_check([int, int, str, list]) 22 | def add(a, b): 23 | """sum a and b""" 24 | return a + b 25 | 26 | print(add.__name__) 27 | print(add.__doc__) 28 | print(add(1, 2)) 29 | 30 | # TEST_4: 31 | @type_check([int, int]) 32 | def add(a, b, c): 33 | return a + b + c 34 | 35 | print(add(1, 2, 3.0)) 36 | 37 | # TEST_5: 38 | @type_check([]) 39 | def add(a, b): 40 | return a + b 41 | 42 | 43 | print(add(1, 2)) 44 | 45 | # TEST_6: 46 | @type_check([int, int, str]) 47 | def add(a, b, c=3): 48 | return a + b + c 49 | 50 | 51 | print(add(1, 2, c=5)) 52 | 53 | -------------------------------------------------------------------------------- /Module_8/Module_8.4/Module_8.4.16/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 3 5 | 6 | # TEST_2: 7 | 8 | 9 | # TEST_3: 10 | add 11 | sum a and b 12 | 3 13 | 14 | # TEST_4: 15 | 6.0 16 | 17 | # TEST_5: 18 | 3 19 | 20 | # TEST_6: 21 | 8 22 | 23 | -------------------------------------------------------------------------------- /Module_8/Module_8.5/Module_8.5.10/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | @track_instances 5 | class Person: 6 | def __init__(self, name): 7 | self.name = name 8 | 9 | def __repr__(self): 10 | return f'Person({self.name!r})' 11 | 12 | 13 | obj1 = Person('object 1') 14 | obj2 = Person('object 2') 15 | 16 | print(Person.instances) 17 | 18 | # TEST_2: 19 | @track_instances 20 | class Cat: 21 | def __init__(self, name, breed): 22 | self.name = name 23 | self.breed = breed 24 | 25 | def __repr__(self): 26 | return f'Cat({self.name!r}, {self.breed!r})' 27 | 28 | 29 | for _ in range(10): 30 | cat = Cat('Кемаль', 'Британский') 31 | 32 | print(len(Cat.instances)) 33 | 34 | # TEST_3: 35 | @track_instances 36 | class Gun: 37 | def __repr__(self): 38 | return 'Gun()' 39 | 40 | 41 | for _ in range(10000): 42 | cat = Gun() 43 | 44 | print(len(Gun.instances)) 45 | print(Gun.instances[3245]) 46 | 47 | -------------------------------------------------------------------------------- /Module_8/Module_8.5/Module_8.5.10/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | [Person('object 1'), Person('object 2')] 5 | 6 | # TEST_2: 7 | 10 8 | 9 | # TEST_3: 10 | 10000 11 | Gun() 12 | 13 | -------------------------------------------------------------------------------- /Module_8/Module_8.5/Module_8.5.11/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | @add_attr_to_class(first_attr=1, second_attr=2) 5 | class MyClass: 6 | pass 7 | 8 | print(MyClass.first_attr) 9 | print(MyClass.second_attr) 10 | 11 | # TEST_2: 12 | @add_attr_to_class(name='Кемаль', breed='Британский') 13 | class Cat: 14 | pass 15 | 16 | 17 | print(Cat.name) 18 | print(Cat.breed) 19 | 20 | # TEST_3: 21 | data = {'name': 'John', 'surname': 'Doe'} 22 | 23 | 24 | @add_attr_to_class(**data) 25 | class Person: 26 | def __init__(self, name=None, surname=None): 27 | self.name = name or self.name 28 | self.surname = surname or self.surname 29 | 30 | 31 | person = Person() 32 | print(person.name) 33 | print(person.surname) 34 | 35 | # TEST_4: 36 | @add_attr_to_class(shoot1='pif', shoot2='paf') 37 | class Gun: 38 | def shoot(self): 39 | print(self.shoot1) 40 | print(self.shoot2) 41 | 42 | 43 | gun = Gun() 44 | gun.shoot() 45 | 46 | -------------------------------------------------------------------------------- /Module_8/Module_8.5/Module_8.5.11/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 1 5 | 2 6 | 7 | # TEST_2: 8 | Кемаль 9 | Британский 10 | 11 | # TEST_3: 12 | John 13 | Doe 14 | 15 | # TEST_4: 16 | pif 17 | paf 18 | 19 | -------------------------------------------------------------------------------- /Module_8/Module_8.5/Module_8.5.12/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | with open('test.json', 'w') as file: 5 | file.write('{"x": 1, "y": 2}') 6 | 7 | @jsonattr('test.json') 8 | class MyClass: 9 | pass 10 | 11 | print(MyClass.x) 12 | print(MyClass.y) 13 | 14 | # TEST_2: 15 | with open('test.json', 'w') as file: 16 | file.write('{"name": "John", "surname": "Doe"}') 17 | 18 | 19 | @jsonattr('test.json') 20 | class Person: 21 | pass 22 | 23 | 24 | print(Person.name) 25 | print(Person.surname) 26 | 27 | # TEST_3: 28 | with open('test.json', 'w') as file: 29 | file.write('{"name": "Кемаль", "breed": "Британский"}') 30 | 31 | 32 | @jsonattr('test.json') 33 | class Cat: 34 | def __init__(self, name=None, breed=None): 35 | self.name = name or self.name 36 | self.surname = breed or self.breed 37 | 38 | 39 | cat = Cat() 40 | print(cat.name) 41 | print(cat.breed) 42 | 43 | # TEST_4: 44 | with open('test.json', 'w') as file: 45 | file.write('{"shoot1": "pif", "shoot2": "paf"}') 46 | 47 | 48 | @jsonattr('test.json') 49 | class Gun: 50 | def shoot(self): 51 | print(self.shoot1) 52 | print(self.shoot2) 53 | 54 | 55 | gun = Gun() 56 | gun.shoot() 57 | 58 | -------------------------------------------------------------------------------- /Module_8/Module_8.5/Module_8.5.12/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 1 5 | 2 6 | 7 | # TEST_2: 8 | John 9 | Doe 10 | 11 | # TEST_3: 12 | Кемаль 13 | Британский 14 | 15 | # TEST_4: 16 | pif 17 | paf 18 | 19 | -------------------------------------------------------------------------------- /Module_8/Module_8.5/Module_8.5.13/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | @singleton 5 | class MyClass: 6 | pass 7 | 8 | obj1 = MyClass() 9 | obj2 = MyClass() 10 | 11 | print(obj1 is obj2) 12 | 13 | # TEST_2: 14 | @singleton 15 | class MyClass: 16 | pass 17 | 18 | 19 | instances = [MyClass() for _ in range(100)] 20 | obj = MyClass() 21 | print(all(instance is obj for instance in instances)) 22 | 23 | # TEST_3: 24 | @singleton 25 | class Person: 26 | def __init__(self, name): 27 | self.name = name 28 | 29 | def __repr__(self): 30 | return f'Person({self.name!r})' 31 | 32 | 33 | instances = [Person('John Doe') for _ in range(1000)] 34 | person = Person('Doe John') 35 | print(person) 36 | print(instances[389]) 37 | print(all(instance is person for instance in instances)) 38 | 39 | -------------------------------------------------------------------------------- /Module_8/Module_8.5/Module_8.5.13/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | 6 | # TEST_2: 7 | True 8 | 9 | # TEST_3: 10 | Person('Doe John') 11 | Person('Doe John') 12 | True 13 | 14 | -------------------------------------------------------------------------------- /Module_8/Module_8.5/Module_8.5.14/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 1 5 | 2 6 | 7 | # TEST_2: 8 | 1 9 | 2 10 | 11 | # TEST_3: 12 | 1 13 | 1 14 | 15 | # TEST_4: 16 | John Doe 17 | атрибут отсутствует 18 | атрибут отсутствует 19 | 20 | # TEST_5: 21 | метод отсутствует 22 | метод отсутствует 23 | 24 | # TEST_6: 25 | 1 26 | 2 27 | 28 | -------------------------------------------------------------------------------- /Module_8/Module_8.5/Module_8.5.15/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | @auto_repr(args=['x', 'y'], kwargs=['color']) 5 | class Point: 6 | def __init__(self, x, y, color): 7 | self.x = x 8 | self.y = y 9 | self.color = color 10 | 11 | point = Point(1, 2, color='green') 12 | print(point) 13 | 14 | point.x = 10 15 | point.y = 20 16 | print(point) 17 | 18 | # TEST_2: 19 | @auto_repr(args=['name', 'surname'], kwargs=[]) 20 | class Person: 21 | def __init__(self, name, surname): 22 | self.name = name 23 | self.surname = surname 24 | 25 | 26 | person = Person('Gvido', 'van Rossum') 27 | 28 | print(person) 29 | 30 | # TEST_3: 31 | @auto_repr(args=[], kwargs=['name', 'breed']) 32 | class Cat: 33 | def __init__(self, name, breed): 34 | self.name = name 35 | self.breed = breed 36 | 37 | 38 | cat = Cat('Кемаль', 'Британский') 39 | 40 | print(cat) 41 | 42 | # TEST_4: 43 | @auto_repr(args=[], kwargs=[]) 44 | class Gun: 45 | pass 46 | 47 | 48 | gun = Gun() 49 | 50 | print(gun) 51 | 52 | # TEST_5: 53 | @auto_repr(args=['x', 'y'], kwargs=['color']) 54 | class Point: 55 | def __init__(self, x, y, color): 56 | self.x = x 57 | self.y = y 58 | self.color = color 59 | 60 | point = Point(1, 2, color='green') 61 | print(repr(point)) 62 | 63 | point.x = 10 64 | point.y = 20 65 | print(repr(point)) 66 | 67 | -------------------------------------------------------------------------------- /Module_8/Module_8.5/Module_8.5.15/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | Point(1, 2, color='green') 5 | Point(10, 20, color='green') 6 | 7 | # TEST_2: 8 | Person('Gvido', 'van Rossum') 9 | 10 | # TEST_3: 11 | Cat(name='Кемаль', breed='Британский') 12 | 13 | # TEST_4: 14 | Gun() 15 | 16 | # TEST_5: 17 | Point(1, 2, color='green') 18 | Point(10, 20, color='green') 19 | 20 | -------------------------------------------------------------------------------- /Module_8/Module_8.6/Module_8.6.24/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | city = City('Tokyo', 14043239, 1457) 5 | 6 | print(city) 7 | print(city.name) 8 | print(city.population) 9 | print(city.founded) 10 | 11 | # TEST_2: 12 | city1 = City('Tokyo', 14043239, 1457) 13 | city2 = City('New York', 8467513, 1624) 14 | city3 = City('Tokyo', 14043239, 1457) 15 | 16 | print(city1 == city2) 17 | print(city1 != city2) 18 | print(city1 == city3) 19 | print(city1 != city3) 20 | 21 | # TEST_3: 22 | city = City('Челябинск', 1189525, 1736) 23 | 24 | print(city) 25 | print(city.name) 26 | print(city.population) 27 | print(city.founded) 28 | 29 | # TEST_4: 30 | city = City('Москва', 13015126, 1147) 31 | 32 | print(city) 33 | print(city.name) 34 | print(city.population) 35 | print(city.founded) 36 | 37 | # TEST_5: 38 | city1 = City('Ростов', 1142162, 1749) 39 | city2 = City('Владивосток', 605049, 1860) 40 | 41 | print(city1) 42 | print(city1.name) 43 | print(city1.population) 44 | print(city1.founded) 45 | 46 | print(city2) 47 | print(city2.name) 48 | print(city2.population) 49 | print(city2.founded) 50 | 51 | print(city2 == city2) 52 | print(city1 != city2) 53 | 54 | -------------------------------------------------------------------------------- /Module_8/Module_8.6/Module_8.6.24/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | City(name='Tokyo', population=14043239, founded=1457) 5 | Tokyo 6 | 14043239 7 | 1457 8 | 9 | # TEST_2: 10 | False 11 | True 12 | True 13 | False 14 | 15 | # TEST_3: 16 | City(name='Челябинск', population=1189525, founded=1736) 17 | Челябинск 18 | 1189525 19 | 1736 20 | 21 | # TEST_4: 22 | City(name='Москва', population=13015126, founded=1147) 23 | Москва 24 | 13015126 25 | 1147 26 | 27 | # TEST_5: 28 | City(name='Ростов', population=1142162, founded=1749) 29 | Ростов 30 | 1142162 31 | 1749 32 | City(name='Владивосток', population=605049, founded=1860) 33 | Владивосток 34 | 605049 35 | 1860 36 | True 37 | True 38 | 39 | -------------------------------------------------------------------------------- /Module_8/Module_8.6/Module_8.6.25/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | print(MusicAlbum('Calendar', 'Motorama', 'Post-punk', 2012)) 5 | 6 | # TEST_2: 7 | musicalbum1 = MusicAlbum('Calendar', 'Motorama', 'Post-punk', 2012) 8 | musicalbum2 = MusicAlbum('Calendar', 'Motorama', 'New Wave, Indie Rock', 2012) 9 | 10 | print(musicalbum1 == musicalbum2) 11 | print(musicalbum1 != musicalbum2) 12 | 13 | # TEST_3: 14 | musicalbum = MusicAlbum('Calendar', 'Motorama', 'Post-punk', 2012) 15 | 16 | try: 17 | musicalbum.genre = 'Post-punk, New Wave, Indie Rock' 18 | except: 19 | print('Error') 20 | 21 | # TEST_4: 22 | musicalbum = MusicAlbum('Камнем по голове', 'КиШ', 'Хоррор-панк', 1996) 23 | 24 | print(musicalbum.title) 25 | print(musicalbum.artist) 26 | print(musicalbum.genre) 27 | print(musicalbum.year) 28 | 29 | # TEST_5: 30 | musicalbum = MusicAlbum('Король и Шут', 'КиШ', 'Хоррор-панк', 1997) 31 | print(musicalbum) 32 | 33 | # TEST_6: 34 | musicalbum1 = MusicAlbum('Calendar', 'Motorama', 'Post-punk', 2012) 35 | musicalbum2 = MusicAlbum('Calendar', 'Motorama', 'New Wave, Indie Rock', 2013) 36 | 37 | print(musicalbum1 == musicalbum2) 38 | print(musicalbum1 != musicalbum2) 39 | 40 | # TEST_7: 41 | musicalbum1 = MusicAlbum('Calendar', 'Motorama', 'Post-punk', 2012) 42 | musicalbum2 = MusicAlbum('Poverty', 'Motorama', 'New Wave, Indie Rock', 2012) 43 | 44 | print(musicalbum1 == musicalbum2) 45 | print(musicalbum1 != musicalbum2) 46 | 47 | -------------------------------------------------------------------------------- /Module_8/Module_8.6/Module_8.6.25/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | MusicAlbum(title='Calendar', artist='Motorama') 5 | 6 | # TEST_2: 7 | True 8 | False 9 | 10 | # TEST_3: 11 | Error 12 | 13 | # TEST_4: 14 | Камнем по голове 15 | КиШ 16 | Хоррор-панк 17 | 1996 18 | 19 | # TEST_5: 20 | MusicAlbum(title='Король и Шут', artist='КиШ') 21 | 22 | # TEST_6: 23 | False 24 | True 25 | 26 | # TEST_7: 27 | False 28 | True 29 | 30 | -------------------------------------------------------------------------------- /Module_8/Module_8.6/Module_8.6.26/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | point = Point() 5 | 6 | print(point) 7 | print(point.x) 8 | print(point.y) 9 | print(point.quadrant) 10 | 11 | # TEST_2: 12 | point = Point(1.0, 2.0) 13 | 14 | print(point.symmetric_x()) 15 | print(point.symmetric_y()) 16 | 17 | # TEST_3: 18 | point1 = Point(1, 2) 19 | point2 = Point(1, 2) 20 | point3 = Point(3, 4) 21 | 22 | print(point1 == point2) 23 | print(point1 == point3) 24 | print(point2 != point3) 25 | 26 | # TEST_4: 27 | for x in range(-3, 4): 28 | for y in range(-3, 4): 29 | point = Point(x, y) 30 | print(point) 31 | 32 | # TEST_5: 33 | for x in range(-3, 4): 34 | for y in range(-3, 4): 35 | point = Point(x, y) 36 | print(point.symmetric_x()) 37 | 38 | # TEST_6: 39 | for x in range(-3, 4): 40 | for y in range(-3, 4): 41 | point = Point(x, y) 42 | print(point.symmetric_y()) 43 | 44 | -------------------------------------------------------------------------------- /Module_8/Module_8.6/Module_8.6.27/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | FootballPlayer(name='Kylian', surname='Mbappe') 5 | Kylian 6 | Mbappe 7 | 180000000 8 | 9 | # TEST_2: 10 | True 11 | False 12 | False 13 | True 14 | 15 | # TEST_3: 16 | FootballTeam(name='PSG') 17 | PSG 18 | [] 19 | [FootballPlayer(name='Kylian', surname='Mbappe')] 20 | 21 | # TEST_4: 22 | True 23 | False 24 | False 25 | True 26 | 27 | # TEST_5: 28 | Best 29 | [FootballPlayer(name='Ronaldo', surname=''), FootballPlayer(name='Lothar', surname='Matthaus'), FootballPlayer(name='Xavi', surname='Simons'), FootballPlayer(name='Paolo', surname='Maldini'), FootballPlayer(name='Лев', surname='Яшин'), FootballPlayer(name='Diego', surname='Maradona'), FootballPlayer(name='Lionel', surname='Messi'), FootballPlayer(name='Kristiano', surname='Ronaldo')] 30 | 31 | -------------------------------------------------------------------------------- /Module_8/Module_8.7/Module_8.7.10/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | class Empty(JsonSerializableMixin): 5 | pass 6 | 7 | obj = Empty() 8 | print(obj.to_json()) 9 | 10 | # TEST_2: 11 | class Triangle(JsonSerializableMixin): 12 | def __init__(self, a, b, c): 13 | self.a = a 14 | self.b = b 15 | self.c = c 16 | 17 | triangle = Triangle(3, 5, 4) 18 | print(triangle.to_json()) 19 | 20 | # TEST_3: 21 | class Country(JsonSerializableMixin): 22 | def __init__(self, name, capital, phone_code): 23 | self.name = name 24 | self.capital = capital 25 | self.phone_code = phone_code 26 | 27 | country = Country('Russia', 'Moscow', 7) 28 | result = json.loads(country.to_json()) 29 | dct = {'name': 'Russia', 'capital': 'Moscow', 'phone_code': 7} 30 | print(isinstance(result, dict)) 31 | print(result == dct) 32 | 33 | # TEST_4: 34 | class Everything(JsonSerializableMixin): 35 | def __init__(self): 36 | self.a = True 37 | self.b = False 38 | self.c = [1, True, False, None] 39 | self.d = (1, True, False, None) 40 | self.e = {False: True, 1: None} 41 | 42 | everything = Everything() 43 | print(everything.to_json()) 44 | 45 | -------------------------------------------------------------------------------- /Module_8/Module_8.7/Module_8.7.10/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | {} 5 | 6 | # TEST_2: 7 | {"a": 3, "b": 5, "c": 4} 8 | 9 | # TEST_3: 10 | True 11 | True 12 | 13 | # TEST_4: 14 | {"a": true, "b": false, "c": [1, true, false, null], "d": [1, true, false, null], "e": {"false": true, "1": null}} 15 | 16 | -------------------------------------------------------------------------------- /Module_8/Module_8.7/Module_8.7.11/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | [06.11.2024 13:03:26] - INFO - Database: Выполнено подключение к базе данных. 5 | [06.11.2024 13:03:26] - INFO - Database: Подключение к базе данных закрыто. 6 | 7 | # TEST_2: 8 | [05.11.2024 11:38:54] - INFO - Order: Заказ № 9876287 создан. 9 | [05.11.2024 11:38:54] - INFO - Order: Заказ № 4778616 создан. 10 | [05.11.2024 11:38:54] - WARNING - Order: Заказ № 4778616 отменен. 11 | 12 | # TEST_3: 13 | [06.11.2024 17:50:58] - INFO - Subscription: Пользователь id=32720521 купил подписку. 14 | [06.11.2024 17:50:58] - WARNING - Subscription: Пользователь id=90843698 отменил подписку. 15 | [06.11.2024 17:50:58] - ERROR - Subscription: Не удалось обновить подписку пользователя id=73520485. 16 | 17 | # TEST_4: 18 | [06.11.2024 18:18:03] - INFO - Inventory: Количество товара "Ручка" на складе = 54. 19 | [06.11.2024 18:18:03] - INFO - Inventory: Количество товара "Карандаш" на складе = 13. 20 | [06.11.2024 18:18:03] - WARNING - Inventory: Товар "Тетрадь" заканчивается на складе. Количество товара = 3. 21 | [06.11.2024 18:18:03] - WARNING - Inventory: Товар "Ластик" отсутствует на складе. 22 | [06.11.2024 18:18:03] - ERROR - Inventory: Не удалось проверить наличие товара "Линейка" на складе. 23 | 24 | -------------------------------------------------------------------------------- /Module_8/Module_8.7/Module_8.7.12/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | [('name', 'Кемаль'), ('age', 6)] 5 | [('_breed', 'Британский')] 6 | 7 | # TEST_2: 8 | [] 9 | [('_account_number', 245980)] 10 | 11 | # TEST_3: 12 | [('order_id', 324154)] 13 | [('_customer_name', 'Timur')] 14 | 15 | # TEST_4: 16 | [] 17 | [] 18 | 19 | # TEST_5: 20 | 10 21 | 10 22 | 23 | # TEST_6: 24 | [('a', 3), ('b', 5), ('c', 4)] 25 | [] 26 | 27 | # TEST_7: 28 | [] 29 | [] 30 | 31 | -------------------------------------------------------------------------------- /Module_8/Module_8.7/Module_8.7.13/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | Empty({}) 5 | 6 | # TEST_2: 7 | Movie({'title': 'Interstellar', '_director': 'Christopher Nolan', '_Movie__rating': 8.7}) 8 | Movie({'title': 'Interstellar', '_director': 'Christopher Nolan', '_Movie__rating': 8.7}) 9 | 10 | # TEST_3: 11 | Book({'title': 'The Hobbit', 'author': 'J.R.R. Tolkien', 'publication_year': 1937, 'genre': 'Fantasy', 'pages': 310, 'language': 'English', ...}) 12 | 13 | # TEST_4: 14 | Private({'_Private__attr1': None, '_Private__attr2': None}) 15 | Private({'_Private__attr1': None, '_Private__attr2': None}) 16 | 17 | # TEST_5: 18 | AlmostEmpty({'_AlmostEmpty__attribute': None, 'attribute_0': None, '_attribute_0': None, 'attribute_1': None, '_attribute_1': None, 'attribute_2': None, ...}) 19 | AlmostEmpty({'_AlmostEmpty__attribute': None, 'attribute_0': None, '_attribute_0': None, 'attribute_1': None, '_attribute_1': None, 'attribute_2': None, ...}) 20 | 21 | # TEST_6: 22 | MyClass({}) 23 | MyClass({'a': 1, 'b': 2, 'c': 3}) 24 | MyClass({'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6}) 25 | MyClass({'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, ...}) 26 | 27 | -------------------------------------------------------------------------------- /Module_9/Module_9.1/Module_9.1.1/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | import math, re 5 | 6 | print(anything() != []) 7 | print(anything() < 'World') 8 | print(anything() > 81) 9 | print(anything() >= re) 10 | print(anything() <= math) 11 | print(anything() == ord) 12 | 13 | # TEST_2: 14 | print(anything() != set()) 15 | print(anything() < {}) 16 | print(anything() > ()) 17 | print(anything() >= True) 18 | print(anything() <= False) 19 | print(anything() == id) 20 | 21 | # TEST_3: 22 | print(anything() != (1, 2, 3)) 23 | print(anything() < {4, 5, 6}) 24 | print(anything() > range(180)) 25 | print(anything() >= {1: 'one'}) 26 | print(anything() <= ['', [], (), set]) 27 | print(anything() == any) 28 | print(anything() != any) 29 | print(anything() > any) 30 | print(anything() < all) 31 | print(anything() <= all) 32 | print(anything() >= all) 33 | 34 | # TEST_4: 35 | print(anything() == filter) 36 | print(anything() != filter) 37 | print(anything() < filter) 38 | print(anything() > filter) 39 | print(anything() >= filter) 40 | print(anything() <= filter) 41 | print(anything() == anything()) 42 | print(anything() != anything()) 43 | print(anything() < anything()) 44 | print(anything() > anything()) 45 | print(anything() >= anything()) 46 | print(anything() <= anything()) 47 | 48 | -------------------------------------------------------------------------------- /Module_9/Module_9.1/Module_9.1.1/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | True 6 | True 7 | True 8 | True 9 | True 10 | 11 | # TEST_2: 12 | True 13 | True 14 | True 15 | True 16 | True 17 | True 18 | 19 | # TEST_3: 20 | True 21 | True 22 | True 23 | True 24 | True 25 | True 26 | True 27 | True 28 | True 29 | True 30 | True 31 | 32 | # TEST_4: 33 | True 34 | True 35 | True 36 | True 37 | True 38 | True 39 | True 40 | True 41 | True 42 | True 43 | True 44 | True 45 | 46 | -------------------------------------------------------------------------------- /Module_9/Module_9.1/Module_9.1.10/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | game = Game(14, 18, 40) 5 | print(game.rows) 6 | print(game.cols) 7 | print(game.mines) 8 | 9 | cell = game.board[0][0] 10 | 11 | print(cell.row) 12 | print(cell.col) 13 | print(0 <= cell.neighbours <= 3) 14 | 15 | # TEST_2: 16 | game = Game(10, 8, 14) 17 | 18 | for r, c in ((0, 0), (0, -1), (-1, 0), (-1, -1)): 19 | cell = game.board[r][c] 20 | print(0 <= cell.neighbours <= 3, type(cell)) 21 | 22 | # TEST_3: 23 | game = Game(10, 8, 14) 24 | 25 | for r in (0, -1): 26 | for c in range(1, game.cols - 1): 27 | cell = game.board[r][c] 28 | print(0 <= cell.neighbours <= 5, type(cell)) 29 | 30 | # TEST_4: 31 | game = Game(10, 8, 14) 32 | 33 | for c in (0, -1): 34 | for r in range(1, game.rows - 1): 35 | cell = game.board[r][c] 36 | print(0 <= cell.neighbours <= 5, type(cell)) 37 | 38 | # TEST_5: 39 | n, m = 10, 8 40 | game = Game(n, m, 14) 41 | total_mines = 0 42 | 43 | for r in range(n): 44 | for c in range(m): 45 | if not game.board[r][c].mine: 46 | print(get_neighbours_count(r, c, game) == game.board[r][c].neighbours) 47 | total_mines += game.board[r][c].mine 48 | 49 | 50 | print(total_mines == game.mines) 51 | print(total_mines) 52 | print(game.mines) 53 | 54 | -------------------------------------------------------------------------------- /Module_9/Module_9.1/Module_9.1.11/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 1 5 | 2 6 | 0 7 | 0 8 | 1 9 | 2 10 | 11 | # TEST_2: 12 | 0 13 | 3 14 | 15 | # TEST_3: 16 | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 17 | 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 18 | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 19 | 20 | # TEST_4: 21 | 3 22 | -1 23 | 2 24 | 0.5 25 | 4 26 | 1 27 | 28 | # TEST_5: 29 | 1 30 | 2 31 | 100 32 | 100 33 | 100 34 | 100 35 | 36 | -------------------------------------------------------------------------------- /Module_9/Module_9.1/Module_9.1.12/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 100 5 | 101 6 | [10, 20, 30] 7 | 8 | # TEST_2: 9 | 100 10 | Ключ отсутствует 11 | 12 | # TEST_3: 13 | [10, 20] 14 | [10, 20, 30] 15 | 16 | # TEST_4: 17 | object oriented programming 18 | object oriented programming 19 | python 20 | 21 | # TEST_5: 22 | 1 1 1 23 | 2 2 2 24 | 25 | # TEST_6: 26 | 1 1 1 27 | 2 2 2 28 | 29 | # TEST_7: 30 | 1 31 | 2 32 | 3 33 | 4 34 | 35 | # TEST_8: 36 | 101 37 | 101 38 | 39 | -------------------------------------------------------------------------------- /Module_9/Module_9.1/Module_9.1.13/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | True 5 | True 6 | True 7 | False 8 | 9 | # TEST_2: 10 | True 11 | False 12 | True 13 | True 14 | 15 | # TEST_3: 16 | True 17 | False 18 | False 19 | 20 | # TEST_4: 21 | True 22 | False 23 | True 24 | 25 | # TEST_5: 26 | True 27 | True 28 | False 29 | True 30 | False 31 | True 32 | True 33 | True 34 | 35 | -------------------------------------------------------------------------------- /Module_9/Module_9.1/Module_9.1.4/input.txt: -------------------------------------------------------------------------------- 1 | # INPUT DATA: 2 | 3 | # TEST_1: 4 | progression = ArithmeticProgression(0, 1) 5 | 6 | for elem in progression: 7 | if elem > 10: 8 | break 9 | print(elem, end=' ') 10 | 11 | # TEST_2: 12 | progression = GeometricProgression(1, 2) 13 | 14 | for elem in progression: 15 | if elem > 10: 16 | break 17 | print(elem, end=' ') 18 | 19 | # TEST_3: 20 | progression = GeometricProgression(4, -2) 21 | count = 0 22 | 23 | for item in progression: 24 | if count == 20: 25 | break 26 | count += 1 27 | print(item, end=' ') 28 | 29 | # TEST_4: 30 | progression = ArithmeticProgression(100, -10) 31 | count = 0 32 | 33 | for item in progression: 34 | if count == 20: 35 | break 36 | count += 1 37 | print(item, end=' ') 38 | 39 | # TEST_5: 40 | progression = GeometricProgression(100, 10) 41 | count = 0 42 | 43 | for item in progression: 44 | if count == 20: 45 | break 46 | count += 1 47 | print(item, end=' ') 48 | 49 | -------------------------------------------------------------------------------- /Module_9/Module_9.1/Module_9.1.4/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | 0 1 2 3 4 5 6 7 8 9 10 5 | 6 | # TEST_2: 7 | 1 2 4 8 8 | 9 | # TEST_3: 10 | 4 -8 16 -32 64 -128 256 -512 1024 -2048 4096 -8192 16384 -32768 65536 -131072 262144 -524288 1048576 -2097152 11 | 12 | # TEST_4: 13 | 100 90 80 70 60 50 40 30 20 10 0 -10 -20 -30 -40 -50 -60 -70 -80 -90 14 | 15 | # TEST_5: 16 | 100 1000 10000 100000 1000000 10000000 100000000 1000000000 10000000000 100000000000 1000000000000 10000000000000 100000000000000 1000000000000000 10000000000000000 100000000000000000 1000000000000000000 10000000000000000000 100000000000000000000 1000000000000000000000 17 | 18 | -------------------------------------------------------------------------------- /Module_9/Module_9.1/Module_9.1.6/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | [] 5 | [12, 10, 8] 6 | 7 | # TEST_2: 8 | [] 9 | [12, 10, 8] 10 | [12, 10, 8] 11 | [] 12 | 13 | # TEST_3: 14 | [] 15 | [12, 10, 8] 16 | [18, 13, 12] 17 | 18 | # TEST_4: 19 | [] 20 | [99, 97, 95, 94, 93] 21 | 22 | # TEST_5: 23 | [] 24 | [100, 100, 100, 100, 100, 100, 100, 100, 100, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99] 25 | 26 | -------------------------------------------------------------------------------- /Module_9/Module_9.1/Module_9.1.8/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | {'Maths': 'Passed! (80%)'} 5 | {'Chemistry': 'Failed! (25%)', 'Computing': 'Failed! (43%)'} 6 | 7 | # TEST_2: 8 | No tests taken 9 | 10 | # TEST_3: 11 | {'Maths': 'Failed! (20%)', 'Chemistry': 'Failed! (0%)', 'Computing': 'Failed! (14%)', 'Informatics': 'Failed! (30%)'} 12 | {'Maths': 'Failed! (40%)', 'Chemistry': 'Failed! (50%)', 'Computing': 'Failed! (29%)', 'Informatics': 'Failed! (30%)'} 13 | 14 | # TEST_4: 15 | {'Maths': 'Passed! (80%)', 'Chemistry': 'Passed! (75%)', 'Computing': 'Passed! (86%)', 'Informatics': 'Passed! (95%)'} 16 | 17 | -------------------------------------------------------------------------------- /Module_9/Module_9.1/Module_9.1.9/output.txt: -------------------------------------------------------------------------------- 1 | # OUTPUT DATA: 2 | 3 | # TEST_1: 4 | Недоступная клетка 5 | X 6 | Игра окончена 7 | X|O|X 8 | ----- 9 | |O|X 10 | ----- 11 | O| |X 12 | 13 | # TEST_2: 14 | Недоступная клетка 15 | Игра окончена 16 | O 17 | X|O|X 18 | ----- 19 | |O| 20 | ----- 21 | |O|X 22 | 23 | # TEST_3: 24 | X 25 | X|O|X 26 | ----- 27 | O|X|O 28 | ----- 29 | X|O|X 30 | Игра окончена 31 | 32 | # TEST_4: 33 | None 34 | Ничья 35 | X|X|O 36 | ----- 37 | O|O|X 38 | ----- 39 | X|X|O 40 | Игра окончена 41 | Ничья 42 | 43 | --------------------------------------------------------------------------------