Home > other >  Pray god to help me have a look
Pray god to help me have a look

Time:02-07

The from sympy import *
Alpha=symbols (' alpha ')
V=250
L=1000
Y=100
M=4
K=0.35
G=9.8
V=float (v)
L=float (l)
Y=float (y)
Def f (alpha) :
S=(g/m * (k * v * cos (alpha)) + tan (alpha)) * l + m * * * * 2 * 2 * g/k ln (1-0.0875 * l/(v * cos (alpha))) - y
Return s
D=0
While f (d) & lt; 0:
D=d + 0.01
If f (d) & gt; 0:
B=d
A=d 0.01
Break
Elif d> 1.6:
Break
X=b
While f (x) & gt; 0:
X=x + 0.01
If f (x) & lt; 0:
E=x
C=x - 0.01
Break
Elif x> 1.6:
Break
Print (a)
Print (b)
Print (c)
Print (e)
Print (f) (a)
Print (f) (b)
Print (f) (c)
Print (f (e))
While f * f (a) (b) & lt; 0:
If f * f (a) ((a + b)/2) & lt; 0:
B=(a + b)/2
Elif (f (a + b)/2) * f (b) & lt; 0:
A=(a + b)/2
Elif (f (a) - f (b)) * * 2 & lt; * * (=10-10) :
Print (" alpha (1)=", end=' ')
Print (57.29578 * (a + b)/2)
Break
While f (c) * f (e) & lt; 0:
If f (c) * f ((c + e)/2) & lt; 0:
E=(c + e)/2
Elif (f (c + e)/2) * f (e) & lt; 0:
C=(c + e)/2
Elif (f (c) - f (e)) * * 2 & lt;=10 * * (1) :
Print (" alpha (1)=", end=' ')
Print (57.29578 * (c + e)/2)
Break
I am novice, invented the dichotomy and root don't know why there is a problem, the second root, and you won't come everyone a great god can help me have a look at
  • Related