First page Back Continue Last page Overview Graphics

random() and randint()

Single random numbers in the Interval [0.0,1.0[ :

>>> np.random.random()

0.14009778370290582

>>> np.random.random()

0.53170053232187742

Creating integer random number with randint():

>>> np.random.randint(1,20)

10

>>> np.random.randint(1,20)

2

>>> np.random.randint(20,30)

22