Simulate 3000 times the value of a
or b
)
on the terminal.
party.py
. The output is a figure and a single letter on the terminal.
On the figure there are
two graphs of functions defined on import numpy as np import matplotlib.pyplot as plt # t will be a list with elements 0, .02, .04,..., 1 t = np.linspace(0, 1, 51) plt.plot(t, dfunc(t), color = "red")Here the first argument of the function plot is the list of the values of the domain, and the second argument contains the values of the function at these points, where dfunc have to be defined before.
plt.hist(experiments, bins=t, density=1)