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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!