Converting (x, y) into (r, ?). The following script converts rectangular inputs into polar (magnitude and phase) coordinates with phase being in radians and degrees. Find the error in the script.
x = input('x= ');
y = input('y= ');
r = sqrt(x^2 +y^2)
theta = atan2(y,x)
deg = (360/pi)*theta
Solution
x = input('x= ');
y = input('y= ');
r = sqrt(x^2 +y^2)
theta = atan2(y,x)
deg = (180/pi)*theta % <-
Trades & Technology
You might also like to view...
Where is the programmed ladder logic stored?
What will be an ideal response?
Trades & Technology
The initial quality is nearest:
The frictionless piston shown in its initial position provides a pressure of 600 kPa in the cylinder. Energy is added until the temperature reaches 250°C.
A) 39.8%
B) 34.4%
C) 30.1%
D) 22.2%
Trades & Technology
Per capita butter consumption has been decreasing since 2001
Indicate whether the statement is true or false
Trades & Technology
____ series bar joists are the strongest bar joists.
A. H B. I C. J D. K
Trades & Technology