Решение на Телефонна любов от Иван Досев
Обратно към всички решения
Към профила на Иван Досев
Резултати
- 8 точки от тестове
- 0 бонус точки
- 8 точки общо
- 30 успешни тест(а)
- 7 неуспешни тест(а)
Код
Лог от изпълнението
......FFF.E............EE....E.......
======================================================================
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_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
IndexError: list index out of range
======================================================================
ERROR: test_multiple_timeouts (test.TestNumsToText)
Test with multiple '-1's next to each other.
----------------------------------------------------------------------
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
======================================================================
ERROR: test_starting_with_timeout (test.TestNumsToText)
Test with a sequence starting 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
======================================================================
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: [] != [2]
Second list contains 1 additional elements.
First extra element 0:
2
- []
+ [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, 1, 2, 3, 9] != [5, 1, 2, 4, 9, 1, 8, 0, 9]
First differing element 3:
3
4
Second list contains 4 additional elements.
First extra element 5:
1
- [5, 1, 2, 3, 9]
+ [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: [1] != [2]
First differing element 0:
1
2
- [1]
+ [2]
----------------------------------------------------------------------
Ran 37 tests in 0.333s
FAILED (failures=3, errors=4)
История (3 версии и 8 коментара)
Иван обнови решението на 30.10.2022 15:56 (преди над 2 години)
Иван обнови решението на 02.11.2022 13:11 (преди над 2 години)
Иван обнови решението на 02.11.2022 18:07 (преди над 2 години)
В повечето случаи, в които ти трябва хем елементът от колекцията, хем индекса му, полезно е
enumerate
: