from random import random


def rand(x):
    """
    Returns a random floating-point number between 0 and the maximum value.

    Args:
        x(float): maximum value.

    Returns:
        float: random number between 0 and `x`

    """
    return random() * x