[Tutor] How to convert the fortran logic to python definition
SATYABRATA DATTA
iamsatyabrata428 at gmail.com
Thu Mar 26 17:16:48 EDT 2020
delta=18.*a*b*c*d-4.*(b**3)*d+b**2*c**2-4.*a*c**3-27.*a**2*d**2
print *, delta, a, b, c, d,d1
if(delta.gt.0.)then
x=2.*b**3-9.*a*b*c+27.*a**2*d
y=3.*sqrt(3.)*a*sqrt(delta)
if((x.lt.0.and.y.lt.0).or.(x.lt.0.and.y.gt.0))then
nii=2
else
nii=0
endif
How to convert this fortran logic to python where delta(a,b,c,d)
should return x(a,b,c,d) and y(a,b,c,d) for the next job when
satisfied the conditions
More information about the Tutor
mailing list