Решение на Телефонна любов от Божидар Горанов
Обратно към всички решения
Към профила на Божидар Горанов
Резултати
- 5 точки от тестове
- 0 бонус точки
- 5 точки общо
- 20 успешни тест(а)
- 17 неуспешни тест(а)
Код
Лог от изпълнението
..F...FFF.E..F...FF...EE.EE.F.FF.FF..
======================================================================
ERROR: test_empty_input (test.TestIsPhonetastic)
Test with empty input.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221020151654/lib/language/python/runner.py", line 67, in thread
raise result
ZeroDivisionError: integer division or modulo by zero
======================================================================
ERROR: test_empty_input (test.TestNumsToText)
Test with empty input.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221020151654/lib/language/python/runner.py", line 67, in thread
raise result
IndexError: list index out of range
======================================================================
ERROR: test_ending_with_timeout (test.TestNumsToText)
Test with a sequence ending with a -1.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221020151654/lib/language/python/runner.py", line 67, in thread
raise result
KeyError: (-1, 1)
======================================================================
ERROR: test_overflow_input (test.TestNumsToText)
Test with oveflowing number of presses.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221020151654/lib/language/python/runner.py", line 67, in thread
raise result
KeyError: (9, 6)
======================================================================
ERROR: test_random_mixed_case (test.TestNumsToText)
Test for a random mixed case.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221020151654/lib/language/python/runner.py", line 67, in thread
raise result
KeyError: (9, 16)
======================================================================
FAIL: test_ignoring_over_330 (test.TestAnglesToNums)
Test that angles rounded over 330 are ignored.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221020151654/lib/language/python/runner.py", line 67, in thread
raise result
AssertionError: Lists differ: [11] != []
First list contains 1 additional elements.
First extra element 0:
11
- [11]
+ []
======================================================================
FAIL: test_overflowing_angles (test.TestAnglesToNums)
Test with an overflowed input.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221020151654/lib/language/python/runner.py", line 67, in thread
raise result
AssertionError: Lists differ: [98] != [2]
First differing element 0:
98
2
- [98]
+ [2]
======================================================================
FAIL: test_random_mixed_case (test.TestAnglesToNums)
Test with a random mixed input.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221020151654/lib/language/python/runner.py", line 67, in thread
raise result
AssertionError: Lists differ: [5, 0, 1, 2, 4, 9, 11, 11, 24, 98, 368, 9993082, 12813] != [5, 1, 2, 4, 9, 1, 8, 0, 9]
First differing element 1:
0
1
First list contains 4 additional elements.
First extra element 9:
98
- [5, 0, 1, 2, 4, 9, 11, 11, 24, 98, 368, 9993082, 12813]
+ [5, 1, 2, 4, 9, 1, 8, 0, 9]
======================================================================
FAIL: test_round_angle_direction (test.TestAnglesToNums)
Test with an angle requiring explicit rounding to floor.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221020151654/lib/language/python/runner.py", line 67, in thread
raise result
AssertionError: Lists differ: [2] != [1]
First differing element 0:
2
1
- [2]
+ [1]
======================================================================
FAIL: test_correct_mapping (test.TestNumsToAngles)
Test correct mapping for all numbers.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221020151654/lib/language/python/runner.py", line 67, in thread
raise result
AssertionError: 0 != 300
======================================================================
FAIL: test_normalizing_for_top_boundary (test.TestNumsToAngles)
Test normalizing when the sum is full circle.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221020151654/lib/language/python/runner.py", line 67, in thread
raise result
AssertionError: 360 != 0
======================================================================
FAIL: test_random_mixed_case (test.TestNumsToAngles)
Test with a random mixed input.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221020151654/lib/language/python/runner.py", line 67, in thread
raise result
AssertionError: 90 != 150
======================================================================
FAIL: test_spaces_only (test.TestNumsToText)
Test for input of only whitespaces with or without -1.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221020151654/lib/language/python/runner.py", line 67, in thread
raise result
AssertionError: ' ' not found in (' ', ' ')
======================================================================
FAIL: test_all_chars (test.TestTextToNums)
Test for correct mapping of all chars.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221020151654/lib/language/python/runner.py", line 67, in thread
raise result
AssertionError: Lists differ: [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4,[121 chars]9, 0] != [2, -1, 2, 2, -1, 2, 2, 2, 3, -1, 3, 3, -1, 3[193 chars]9, 0]
First differing element 1:
2
-1
Second list contains 18 additional elements.
First extra element 57:
-1
[2,
+ -1,
2,
2,
+ -1,
2,
2,
2,
3,
+ -1,
3,
3,
+ -1,
3,
3,
3,
4,
+ -1,
4,
4,
+ -1,
4,
4,
4,
5,
+ -1,
5,
5,
+ -1,
5,
5,
5,
6,
+ -1,
6,
6,
+ -1,
6,
6,
6,
7,
+ -1,
+ 7,
+ 7,
+ -1,
7,
7,
7,
+ -1,
- 7,
- 7,
7,
7,
7,
7,
8,
+ -1,
8,
8,
+ -1,
8,
8,
8,
9,
+ -1,
+ 9,
+ 9,
+ -1,
9,
9,
9,
+ -1,
- 9,
- 9,
9,
9,
9,
9,
0]
======================================================================
FAIL: test_complex_word (test.TestTextToNums)
Test with a complex word that requires -1.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221020151654/lib/language/python/runner.py", line 67, in thread
raise result
AssertionError: Lists differ: [4, 6, 6] != [4, 6, -1, 6]
First differing element 2:
6
-1
Second list contains 1 additional elements.
First extra element 3:
6
- [4, 6, 6]
+ [4, 6, -1, 6]
? ++++
======================================================================
FAIL: test_mixed_casing (test.TestTextToNums)
Test for both lower and capital case.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221020151654/lib/language/python/runner.py", line 67, in thread
raise result
AssertionError: Lists differ: [2, 2, 2, 3, 3] != [2, -1, 2, 2, 3, -1, 3]
First differing element 1:
2
-1
Second list contains 2 additional elements.
First extra element 5:
-1
- [2, 2, 2, 3, 3]
+ [2, -1, 2, 2, 3, -1, 3]
? ++++ ++++
======================================================================
FAIL: test_random_mixed_case (test.TestTextToNums)
Test for a random mixed case.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/storage/deedee/data/rails/pyfmi-2022/releases/20221020151654/lib/language/python/runner.py", line 67, in thread
raise result
AssertionError: [8, 8, 8, 2, 7, 7, 7, 7, 5, 5, 6, 6, 6, 0, 0, 0, 5, 2, 2, 2, 2, 8, 2] not found in ([8, 8, 8, 2, 7, 7, 7, 7, 5, 5, 6, 6, 6, 0, -1, 0, -1, 0, 5, 2, -1, 2, 2, -1, 2, 8, 2], [8, 8, 8, 2, 7, 7, 7, 7, 5, 5, 6, 6, 6, 0, 0, 0, 5, 2, -1, 2, 2, -1, 2, 8, 2])
----------------------------------------------------------------------
Ran 37 tests in 0.347s
FAILED (failures=12, errors=5)
История (2 версии и 10 коментара)
Божидар обнови решението на 30.10.2022 13:22 (преди над 2 години)
Божидар обнови решението на 01.11.2022 11:52 (преди над 2 години)
А Ако ъгълът е по-малък от нула, нямаш ли нужда от подобна операция?