I would put

```
if not (6 <= n <= 8):
    raise ValueError(" some info about the error ")
```