Python random number

I need to make random coordinates for vertexes and then i need to count them. With random.uniform(-4.9, 5) i get this, but numbers after comma is to high for counting them. How can i get something like this - 4.99 not 4.99264789854126?

How about:

import random
c = random.randint(-499,500)
c /= 100.0

Thx, it works fine.:slight_smile:

you could also use round() on a random floating point number