import math
print(math.tan(1)) # 1.5574077246549023
print(math.tan(0.56)) # 0.6269495350526982
print(math.tan(-0.56)) # -0.6269495350526982
print(math.tan(-1)) # -1.5574077246549023
print(math.tan(0)) # 0.0
print(math.tan(math.pi)) # -1.2246467991473532e-16
Note that all the inputs are in radian. import math
in_degree = 90
in_redian = math.radians(in_degree)
print(math.tan(in_redian)) # 1.633123935319537e+16
import matplotlib.pyplot as plt
x=[]
y=[]
i=0
while (i<=8):
x.append(i)
y.append(math.tan(i))
i=i+0.1
plt.plot(x,y)
plt.axvline(x=0.00,linewidth=2, color='#f1f1f1')
plt.axhline(y=0.00,linewidth=2, color='#f1f1f1')
plt.grid(linestyle='-', linewidth=0.5,color='#f1f1f1')
plt.show()
acos() asin() cos() sin()
Author
🎥 Join me live on YouTubePassionate about coding and teaching, I publish practical tutorials on PHP, Python, JavaScript, SQL, and web development. My goal is to make learning simple, engaging, and project‑oriented with real examples and source code.