MATH 314 Quiz 02

  1. Suppose we've initialized a random number generator from Numpy as
    import numpy as np
    rng = np.random.default_rng()
    1. Generate and store 100 random numbers using rng into a variable named x.
    2. Calculate the mean of x.
  2. Suppose we have the following code.
    a = np.zeros(shape = (3, 4, 5))
    1. How many elements are in a?
    2. How many dimensions are in a?
    3. What are the lenghts of each dimension of a?