I have a question where it shows customers entering a bar at a rate of 7 per hour, the question states i NEED to use random.expovariate() and generate a histogram showing 100 inter-arrival times. So far i have this
import numpy as np
from matplotlib import pyplot as plt
import random
def customers():
x=np.random.expovariate(7,100)
plt.hist(x,100)
plt.axis([-0,100,0,100])
plt.show()
return True
def main():
global history
print(customers())
if __name__ == "__main__":
main()
And I am getting the error
AttributeError: 'module' object has no attribute 'expovariate'
Also i am not 100% this is how i would show the graph, i have researched it and not found a clear answer anywhere! Hope you can help