---
id: 696655d24b614176d4c9b78a
title: "Challenge 167: Bingo! Letter"
challengeType: 29
dashedName: challenge-167
---

# --description--

Given a number, return the bingo letter associated with it (capitalized). Bingo numbers are grouped as follows:

| Letter | Number Range |
| - | - |
| `"B"` | 1-15 |
| `"I"` | 16-30 |
| `"N"` | 31-45 |
| `"G"` | 46-60 |
| `"O"` | 61-75 |

# --hints--

`get_bingo_letter(75)` should return `"O"`.

```js
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_bingo_letter(75), "O")`)
}})
```

`get_bingo_letter(54)` should return `"G"`.

```js
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_bingo_letter(54), "G")`)
}})
```

`get_bingo_letter(25)` should return `"I"`.

```js
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_bingo_letter(25), "I")`)
}})
```

`get_bingo_letter(38)` should return `"N"`.

```js
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_bingo_letter(38), "N")`)
}})
```

`get_bingo_letter(11)` should return `"B"`.

```js
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_bingo_letter(11), "B")`)
}})
```

# --seed--

## --seed-contents--

```py
def get_bingo_letter(n):

    return n
```

# --solutions--

```py
def get_bingo_letter(n):
    if 1 <= n <= 15:
        return "B"
    if 16 <= n <= 30:
        return "I"
    if 31 <= n <= 45:
        return "N"
    if 46 <= n <= 60:
        return "G"
    if 61 <= n <= 75:
        return "O"
    return None
```
