Question: help with part b please Va. Write a Python function taking as input: the time i after introducing a product the parameters M,p, and that

help with part b please Va. Write a Python function taking ashelp with part b please

Va. Write a Python function taking as input: the time i after introducing a product the parameters M,p, and that returns the value A(t) from the Bass diffusion model as output. Evaluate the function at t = 5 years, and with parameters M = 1,000, p= 0.03, and q = 0.38. Make sure to print the returned value should be around 331.199). NOTE: Mathematical functions like, natural log (In) or an exponential (i.e. e) can be called using the Python math library. You may need to look up what these functions are and don't forget to include " import math " in your codel In [14]: 1 # Put your pseudocode and code here 2 import math 3 def Bass(t, M,p.9): model=M*((1-(math.exp(-1*(p+q)*t))))/((1+(q/p)*(math.exp(-1*(p+q)*t)))) 5 print(model) 6 7 Bass(5, 1000,.03,.38) 331. 19864249137356 b. Make a plot of the number of adopters versus time for these same parameters. Use the code below as a starting place. Be sure to label all of your axes. In [26] : 1 # Put your pseudocode and code here 2 import matplotlib.pyplot as plt 3 times = list(range(0,20)) # list of times, calculate number of adopters for each entry in times; make a plot ad 4 plt.plot(Bass(times, 1000,.03,.38), times)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!