-
Description My answer suggests that the meaning of life regards spending your life with a loved one.
Code from statistics import mean LIVES = 1 SPAN = 72 MONTHS = 12 DAYS = 7 COMPANY = 2 #3's a crowd def meaning_of_life_is(ing=range(LIVES,SPAN//MONTHS*DAYS*COMPANY)): return '{}'.format(mean(ing), 'of', 'life')
Test Cases import codewars_test as test # TODO Write tests from solution import meaning_of_life_is # or from solution import example # test.assert_equals(actual, expected, [optional] message) .describe("Example") def test_group(): .it("test case") def test_case(): test.assert_not_equals(meaning_of_life_is(), None)
Output:
-
Code def meaning_of_life_is():return """go crazy with your imagination and return anything you like.strings, numbers, ... just don't return None.may the most creative answer win"""- from statistics import mean
- LIVES = 1
- SPAN = 72
- MONTHS = 12
- DAYS = 7
- COMPANY = 2 #3's a crowd
- def meaning_of_life_is(ing=range(LIVES,SPAN//MONTHS*DAYS*COMPANY)):
- return '{}'.format(mean(ing), 'of', 'life')
- All
- {{group.name}} ({{group.count}})
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}