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)
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
Cancel reply