I wrote a very simple python program.
#!/usr/bin/env python
import random
x = random.uniform(-1, 1)
print str(x)
I run this from command pr
The solution to your problem is renaming your file (random.py)
to something other than Python built-ins, standard libraries, reserved keywords etc.
However I strongly recommend you take Python Tutorial, before trying any other tutorial or book. You especially need to learn more about Python scopes and namespaces.