Python simulation of a company's
<p>I have an assignment where I have to use Python code to simulate a company's hourly average maximum customer volume. The homework prompt says to import the random module and use the random.random() method. My issue is that I don't know what to put into the function itself. Here's the code I have so far:</p>

<pre><code>import random

#Function to calculate the average maximum of customers per hour

def ave_max_calc(C, H, D):

    **HELP**


print('Hello, welcome to my average maximum hourly customer volume calculator!')

C = int(input('Give the number of customers per day: '))
H = int(input('Give the number of business hours per day: '))
D = int(input('Give the number of days to simulate: '))

print('The average maximum hourly customer volume is: ', ave_max_calc(C,H, D))
</code></pre>

<p>Maximum hourly customer volume is a rate so you should simulate this with a poisson distribution. You can create a poisson distribution like this:</p>

<pre><code>import numpy as np
rate =  float(C)/H
customers = np.random.poisson(rate, D*H)
</code></pre>

<p>Documentation for the poisson distribution can be found here: <a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.random.poisson.html" rel="nofollow">http://docs.scipy.org/doc/numpy/reference/generated/numpy.random.poisson.html</a></p>

<p>When you say average maximum do you mean the average of the maximum customer rate for each day?</p>

python random module simulation