Question: Call the function with inputs that correspond to the origin point. The function call should evaluate to the string 'origin'. def quadrant ( x ,

Call the function with inputs that correspond to the origin point. The function call should evaluate to the string 'origin'.
def quadrant(x, y):
"""Return the quadrant of a point (x,y) on a two-dimensional plane.
There are three special cases that are not considered members of a
specific quadrant:
1. Point (0,0) is the 'origin'.
2. Non-origin points with y=0 are on the 'x-axis'.
3. Non-origin points with x=0 are on the 'y-axis'.
Examples:
quadrant(0,0) returns 'origin'
quadrant(10,0) returns 'x-axis'
quadrant(0,5) returns 'y-axis'
quadrant(3,5) returns 'I'
quadrant(-5,10) returns 'II'
quadrant(-2,-5) returns 'III'
quadrant(7,-5) returns 'IV'
Parameters:
x: x-coordinate
y: y-coordinate

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 Programming Questions!