next up previous
Next: About this document ...

ESC 251 HW 31 Due: Dec. 5

Hand in your Python scripts and program output.



1)
(3 pts) Write a function that will take in the coordinates of a point (x,y) and return the polar coordinates of the point. Test your function using the point (-4.1,-4.1).
2)
(8 pts) Write a function that will take in a list x of double precision values and return either the 1-norm, the 2-norm or the infinity norm of the list. Use a flag input variable to determine the type of norm to compute. Test your function for all three cases using the first column of the hw30_1.dat data file.





2018-12-03