Mar-24-2022, 05:21 AM
Hi!
In this block, I need to try all combinations of variables in the ht expression and save only those combinations that ensure the equality of the ht to zero.
I have lists of values for each variable used in expression ht. The variable o is an array whose columns contain interrelated values for 2 variables and that values should to be sorted line by line.
I got a SyntaxError in try (invalid syntax). I also used to change the condition with "try" by using the construction with "if" and "insclose(ht, 0)" instead of "ht == 0", but I get the same syntax error.
Please tell me where this error came from and how to fix it.
In this block, I need to try all combinations of variables in the ht expression and save only those combinations that ensure the equality of the ht to zero.
I have lists of values for each variable used in expression ht. The variable o is an array whose columns contain interrelated values for 2 variables and that values should to be sorted line by line.
I got a SyntaxError in try (invalid syntax). I also used to change the condition with "try" by using the construction with "if" and "insclose(ht, 0)" instead of "ht == 0", but I get the same syntax error.
Please tell me where this error came from and how to fix it.
for i in z30: for o in zres: for l in z70: def function_gam0(et0, y30, ph0b, o, l): ht = o[0] * et0 * cos(i) / sqrt(ph0b) + o[1] * -et0 * sin(i) / sqrt(ph0b) + l * sqrt(1 / ph0b) * et0 * sin(i) + funct_labt(i, o[1], l, o[0]) * (sqrt(1 / ph0b) * (1 + et0 * cos(i) * (1 + et0 * cos(i)**2) / ph0b**2 try: ht == 0 if True: lh0 = i, o[0], o[1], l return lh0 print(lh0) except: pass