Question: zi=cos(n2k)+isin(n2k),withk=0,1,2,,n1 Write a function runity(n) that returns the nth root of unity. Your function shoult return a list of the roots of unity. In [

zi=cos(n2k)+isin(n2k),withk=0,1,2,,n1 Write a function runity(n) that returns the nth root of unity. Your function shoult return a list of the roots of unity. In [ ]: def runity (n) : \# YOUR COOE HERE raise NotImplementedError() In [ ]: M assert isinstance(runity(12), list) In [ ]: M assert isinstance(runity(1), list) In [ ]: M assert isinstance(runity(5)[], complex) In [ ]: M assert len( runity (12))==12 In [ ]: M assert runity(12)[]==1+1j In [ ]: M
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
