Move History

Rooted by: meaning of life
Fork Selected
  • 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)
    @test.describe("Example")
    def test_group():
        @test.it("test case")
        def test_case():
            test.assert_not_equals(meaning_of_life_is(), None)
    
  • 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')