import numpy as np
import matplotlib.pyplot as plt
f=float(input('enter the sample frequency'))
f1=float(input('enter the frequency'))
f2=float(input('enter the frequency'))
x1=np.arange(0,10,0.25)
x2=np.arange(0,10,0.25)
a=np.sin(2*np.pi*x1*f1/f)*(180/np.pi)
b=np.sin(2*np.pi*x2*f2/f)*(180/np.pi)
x3=a+b
plt.subplot(3,1,1)
plt.plot(x1,a)
plt.title('sine wave')
plt.xlabel('time')
plt.ylabel('amplitude')
plt.subplot(3,1,2)
plt.plot(x2,b)
plt.title('sine wave')
plt.xlabel('time')
plt.ylabel('amplitude')
plt.subplot(3,1,3)
plt.plot(x3)
plt.title('addtion of two waves')
plt.xlabel('time')
plt.ylabel('amplitude')
plt.show()
