1# To create a list of random integer values:
2import random
3randomlist = random.sample(range(10, 30), 5)
4# Output:
5# [16, 19, 13, 18, 15]
6
7# To create a list of random float numbers:
8import numpy
9random_float_array = numpy.random.uniform(75.5, 125.5, 2)
10# Output:
11# [107.50697835, 123.84889979]
1from num_tool import random_num_list
2print(random_num_list(0, 5, length=20))
1import random
2randomlist = []
3for i in range(0,5):
4n = random.randint(1,30)
5randomlist.append(n)
6print(randomlist)