Q:

Write a NumPy program to generate a random number between 0 and 1

0

Write a NumPy program to generate a random number between 0 and 1

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

import numpy as np
rand_num = np.random.normal(0,1,1)
print("Random number between 0 and 1:")
print(rand_num)

Sample Output:

Random number between 0 and 1:
[-1.15262276]

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now