Please improve these comprehensions (was meaning of [ ])

Tony van der Hoff lists at vanderhoff.org
Wed Sep 6 12:18:25 EDT 2017


On 06/09/17 16:31, Ian Kelly wrote:
> On Wed, Sep 6, 2017 at 1:37 AM, Marko Rauhamaa <marko at pacujo.net> wrote:
>> Which reminds me of this puzzle I saw a couple of days ago:
>>
>>    1 + 4 = 5
>>    2 + 5 = 12
>>    3 + 6 = 21
>>    8 + 11 = ?
>>
>> A mathematician immediately comes up with a "wrong" answer.
> There are no "wrong" answers with these kinds of puzzles. There are
> only answers with varying degrees of parsimony with the known facts.
>
> I say the answer is clearly "banana" because the key to the puzzle is
> that everything matches a line from the following look-up table:
>
> 5 => 5
> 7 => 12
> 9 => 21
> 19 => banana

40





More information about the Python-list mailing list