EDIT: whoops I realized you needed a random number from -.5 to .5
not -5 to 5
There are many ways to do what you are trying to do.
The most straightforward is like this: random.uniform(-.5,.5) Here's an alternate way if you didn't know uniform existed,
requires a bit of math thinking: random.random() - .5