title: The Quiz
tags: rant, python, scripting, quiz
comments: true
date: 2014-04-23 21:16:39+00:00

## The Quiz

You have these numbers at your disposal:

```text
1, 3, 5, 7, 9, 11, 13, 15

```

use them, with repetition, to make the following expression evaluate to true:

```text
__ + __ + __ + __ + __ = 30

```

...

## Solution

What I naturally did was:

```python
def all_combos(arr, result):
    """"""

    if len(result) == 5:
        if sum(result) == 30:
            print result
    else :
        for x in arr:
            new_result = result[:]
            new_result.append(x)

            all_combos(arr, new_result)


available_numbers = range(1, 16)[::2]

all_combos(available_numbers, [])

```

Which gave no solutions at all...

So I raged at the person who gave the question, and they replied:

> Dude, there is no way you can add odd numbers an odd number of times, and get an even number. That's the real solution.

![image](/images/Conan_facepalm_by_wolfjmk.jpg)

## Conclusion

Ever heard of the "Helicopter Approach"? Well, you should read about it.
