GENERATE RANDOM NUMBERS: NUMPY BASIC EXERCISE 18
Find a solution in Numpy that generate random numbers based on standard normal distribution
In this exercise, we are going to generate random number up-to 20 based on standard normal distribution.
Note: normal(loc=0.0, scale=1.0, size=None). Draw random samples from a normal (Gaussian) distribution. The probability density function of the normal distribution, first derived by De Moivre and 200 years later by both Gauss and Laplace independently.
Code
import numpy as np rand = np.random.normal(0,20,20) print("Generating 20 random values") print(rand)
Output
import numpy as np
rand = np.random.normal(0,20,20)
print("Generating 20 random values")
print(rand)