Feb-09-2019, 06:32 PM (This post was last modified: Feb-09-2019, 06:58 PM by snippsat. Edited 2 times in total.

*Edit Reason: Added code tag*) I have an assignment where i have plot two physics equations named them as x and why,

The only unkown is the angle, so i made a loop for the possible angles between 0 and 360

Is there anything wrong with my code?

The only unkown is the angle, so i made a loop for the possible angles between 0 and 360

import math import numpy import matplotlib.pyplot as plt l= 1.5 m= 2.5 g= 9.81 d= 2.7 k= 9.08 alpha = 0 while (alpha<360): alpha = alpha + 1 angles = math.radians(alpha) x = 1-((2*l)/d)*math.sin(angles) y = ((m*g)/(k*d))*math.tan(angles) plt.plot(x,y) plt.show()My question is how do i plot the two equations without knowing the value of theta?

Is there anything wrong with my code?