getting sin curve values using python
Question: I am looking to create a sin curve using python. I want a code to generate the
values in the form of a sine curve. Such that if i plot those values i should
get this curve. Can someone help me with this ? I should be able to differ the
number of values it takes to reach the peak (basically varying the frequency).
Thank you


Answer: Have you got Matplotlib and NumPy installed?

    
    
    >>> import matplotlib.pyplot as plt
    >>> import numpy as np
    >>> x = np.linspace(-10, 10, 1000)
    >>> y = np.sin(x)
    >>> plt.plot(x, y)
    [<matplotlib.lines.Line2D object at 0x25d1ed0>]
    >>> plt.show()
    

Skip the last few steps if you don't need the plot.

