random.uniform function

import random


def generateRandomFloat(minValue, maxValue):
    return random.uniform(minValue, maxValue)


minValue = 10.5
maxValue = 20.5
randValue = generateRandomFloat(minValue, maxValue)

print(randValue)

Leave a Comment

Your email address will not be published. Required fields are marked *