import random


def update_nums(values):
    """recursively replace all numeric values in a dict with random floats"""
    for k, v in values.items():
        if type(v) == int or type(v) == float:
            values[k] = v * random.random()
        elif type(v) == dict:
            values[k] = update_nums(v)
    return values