You can use the truncate function defined here to get just the 5 decimal values, multiply it by 100.000, sum with a random int between 100 and 999, divide it by 100.000 and the rounding up to 5 decimal values again.
def truncate(f, n):
'''Truncates/pads a float f to n decimal places without rounding'''
s = '{}'.format(f)
if 'e' in s or 'E' in s:
return '{0:.{1}f}'.format(f, n)
i, p, d = s.partition('.')
return '.'.join([i, (d+'0'*n)[:n]])
import random
float = 51.31876543
float = truncate(float, 5)
float = float * 10e5
random_3_numbers = random.randint(100,999)
float += random_3_numbers
float /= 10e5
float = truncate(float, 5)
Also, your question is badly tagged. It should contain python
and other tags as well.