Python programto find Sine and Cosine Values plot using Matplotlib

import numpy as np
import matplotlib.pyplot as plt
x=np.linspace(0,1)
data1 = np.sin(x)
data2 = np.cos(x)
fig, ax1 = plt.subplots()
color = 'tab:red'
ax1.set_xlabel('x')
ax1.set_ylabel('sine', color=color)
ax1.plot(x, data1, color=color)
ax1.tick_params(axis='y', labelcolor=color)
ax2 = ax1.twinx()
color = 'tab:green'
ax2.set_ylabel('cosine', color=color)
ax2.plot(x, data2, color=color)
ax2.tick_params(axis='y', labelcolor=color)
plt.show()




#Simple Implementation
#---------------------------------------------------------------------
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(-np.pi, np.pi, 256, endpoint=True)
c= np.cos(x)
s= np.sin(x)
plt.plot(x,c)
plt.plot(x,s)
plt.show()

Solving linear mathematical equations with two variable

import numpy as np
A=np.array([[1.5,1],[3.75,4]])
B=np.array([1800,900])
x=np.linalg.solve(A,B)
print("Values of A and B variables:",x)
h=np.allclose(np.dot(A, x), B)
print("Substitution of two variables in equation to validate:",h)