C5_W4_A1_Exercise 1 get_angles

Sorry but i reviewed all the related threads, even took the correction of 2*i//2 from Tom Mosher but cant seem to manage the right syntax (?) - any tips from Python experts appreciated:
My (wrong) code (preceding the error) is below:

{mentor edit: code removed}

File “”, line 19
return angles
SyntaxError: invalid syntax

angles = pos / np.power(10000, (2 * (i // 2)) / d)

But including the latest recommended i=k//2 code, it doesn’t work giving ‘Assertion Error’ – Note that I have tried every possible variation of TMosh recommendation – please any hint, tip appreciated.


{mentor edit: code removed}


ERROR report below_________________________________________

hello sir
it still have the issue
{mentor edit - code removed}

The notebook has been updated recently. So tips you find on the forum may not apply.

i got it to work, after the update,
Hint: since you now have i=k//2, you dont need ‘//’ again in the next line for ‘angles=…’

1 Like

Right, that makes sense. Thanks.

Thank you , Nice tip