Решение на doge от Аделина Рудова
Обратно към всички решения
Към профила на Аделина Рудова
Резултати
- 5 точки от тестове
- 0 бонус точки
- 5 точки общо
- 7 успешни тест(а)
- 8 неуспешни тест(а)
Код
Лог от изпълнението
EEEEEEEE.......
======================================================================
ERROR: test_sentence_with_parasite_word_as_part_of_normal_one (test.TestDogeSay)
----------------------------------------------------------------------
Traceback (most recent call last):
File "lib/language/python/runner.py", line 60, in thread
raise it.exc_info[1]
File "lib/language/python/runner.py", line 48, in run
self.result = func(*args, **kwargs)
File "/tmp/d20141216-14586-1ddqgdg/test.py", line 52, in test_sentence_with_parasite_word_as_part_of_normal_one
self.assertEqual(2, solution.count_doge_words("wow soon hard such difficult"))
File "/tmp/d20141216-14586-1ddqgdg/solution.py", line 17, in count_doge_words
return (map(is_parasite, sentence.split())).count(True)
AttributeError: 'map' object has no attribute 'count'
======================================================================
ERROR: test_sentence_without_slangs (test.TestDogeSay)
----------------------------------------------------------------------
Traceback (most recent call last):
File "lib/language/python/runner.py", line 60, in thread
raise it.exc_info[1]
File "lib/language/python/runner.py", line 48, in run
self.result = func(*args, **kwargs)
File "/tmp/d20141216-14586-1ddqgdg/test.py", line 49, in test_sentence_without_slangs
self.assertEqual(0, solution.count_doge_words("The quick brown fox jumps over"))
File "/tmp/d20141216-14586-1ddqgdg/solution.py", line 17, in count_doge_words
return (map(is_parasite, sentence.split())).count(True)
AttributeError: 'map' object has no attribute 'count'
======================================================================
ERROR: test_with_empty_sentence (test.TestDogeSay)
----------------------------------------------------------------------
Traceback (most recent call last):
File "lib/language/python/runner.py", line 60, in thread
raise it.exc_info[1]
File "lib/language/python/runner.py", line 48, in run
self.result = func(*args, **kwargs)
File "/tmp/d20141216-14586-1ddqgdg/test.py", line 55, in test_with_empty_sentence
self.assertEqual(0, solution.count_doge_words(""))
File "/tmp/d20141216-14586-1ddqgdg/solution.py", line 17, in count_doge_words
return (map(is_parasite, sentence.split())).count(True)
AttributeError: 'map' object has no attribute 'count'
======================================================================
ERROR: test_with_glued_parasite_words (test.TestDogeSay)
----------------------------------------------------------------------
Traceback (most recent call last):
File "lib/language/python/runner.py", line 60, in thread
raise it.exc_info[1]
File "lib/language/python/runner.py", line 48, in run
self.result = func(*args, **kwargs)
File "/tmp/d20141216-14586-1ddqgdg/test.py", line 61, in test_with_glued_parasite_words
self.assertEqual(0, solution.count_doge_words('wowlolsosuchmuchvery'))
File "/tmp/d20141216-14586-1ddqgdg/solution.py", line 17, in count_doge_words
return (map(is_parasite, sentence.split())).count(True)
AttributeError: 'map' object has no attribute 'count'
======================================================================
ERROR: test_with_more_space_between_parasites (test.TestDogeSay)
----------------------------------------------------------------------
Traceback (most recent call last):
File "lib/language/python/runner.py", line 60, in thread
raise it.exc_info[1]
File "lib/language/python/runner.py", line 48, in run
self.result = func(*args, **kwargs)
File "/tmp/d20141216-14586-1ddqgdg/test.py", line 67, in test_with_more_space_between_parasites
self.assertEqual(6, solution.count_doge_words('wow lol so such much very'))
File "/tmp/d20141216-14586-1ddqgdg/solution.py", line 17, in count_doge_words
return (map(is_parasite, sentence.split())).count(True)
AttributeError: 'map' object has no attribute 'count'
======================================================================
ERROR: test_with_parasite_sentence (test.TestDogeSay)
----------------------------------------------------------------------
Traceback (most recent call last):
File "lib/language/python/runner.py", line 60, in thread
raise it.exc_info[1]
File "lib/language/python/runner.py", line 48, in run
self.result = func(*args, **kwargs)
File "/tmp/d20141216-14586-1ddqgdg/test.py", line 58, in test_with_parasite_sentence
self.assertEqual(6, solution.count_doge_words('wow lol so such much very'))
File "/tmp/d20141216-14586-1ddqgdg/solution.py", line 17, in count_doge_words
return (map(is_parasite, sentence.split())).count(True)
AttributeError: 'map' object has no attribute 'count'
======================================================================
ERROR: test_with_repeating_parasite_words (test.TestDogeSay)
----------------------------------------------------------------------
Traceback (most recent call last):
File "lib/language/python/runner.py", line 60, in thread
raise it.exc_info[1]
File "lib/language/python/runner.py", line 48, in run
self.result = func(*args, **kwargs)
File "/tmp/d20141216-14586-1ddqgdg/test.py", line 64, in test_with_repeating_parasite_words
self.assertEqual(5, solution.count_doge_words('wow hard wow much such difficult much'))
File "/tmp/d20141216-14586-1ddqgdg/solution.py", line 17, in count_doge_words
return (map(is_parasite, sentence.split())).count(True)
AttributeError: 'map' object has no attribute 'count'
======================================================================
ERROR: test_with_simple_sentence (test.TestDogeSay)
----------------------------------------------------------------------
Traceback (most recent call last):
File "lib/language/python/runner.py", line 60, in thread
raise it.exc_info[1]
File "lib/language/python/runner.py", line 48, in run
self.result = func(*args, **kwargs)
File "/tmp/d20141216-14586-1ddqgdg/test.py", line 46, in test_with_simple_sentence
self.assertEqual(3, solution.count_doge_words("wow much hard such difficult"))
File "/tmp/d20141216-14586-1ddqgdg/solution.py", line 17, in count_doge_words
return (map(is_parasite, sentence.split())).count(True)
AttributeError: 'map' object has no attribute 'count'
----------------------------------------------------------------------
Ran 15 tests in 0.014s
FAILED (errors=8)
История (5 версии и 4 коментара)
Аделина обнови решението на 06.03.2014 16:21 (преди над 10 години)
Аделина обнови решението на 07.03.2014 10:39 (преди над 10 години)
Аделина обнови решението на 07.03.2014 11:00 (преди над 10 години)
Аделина обнови решението на 08.03.2014 20:47 (преди над 10 години)
Аделина обнови решението на 12.03.2014 00:01 (преди над 10 години)