Point in first quadrant
Input
determine_quadrant(3, 4)
Output
Q1
Both x and y are positive, so the point is in quadrant 1.
Full lesson preview
Given x and y coordinates, determine which Cartesian quadrant (or axis/origin) the point lies in.
Problem statement
Task
Examples
Input
determine_quadrant(3, 4)
Output
Q1
Both x and y are positive, so the point is in quadrant 1.
Input format
Output format
Constraints
Samples
Input
determine_quadrant(-2, 3)
Output
Q2
x is negative and y is positive, so quadrant 2.