A word to the wise: Careful with things like this `else`.  The way you've written it here anything entered as `relative ` will trigger the relative clause.  i.e. If I ran `random_location(bob, 10, 10, 42), `if not relative` would evaluate to False, so the `else` would trigger.

This is kinda advanced, but important.  See also [Truthiness](https://www.udacity.com/wiki/cs258/truthiness_in_python)

Your code is fine, but as a next step on a real project you'd want to document this characteristic, limit the types of values, or get some sort of error thrown if it wasn't a boolean passed in.  I think you know most of this, but wanted to get you some advanced material.