Python Program to find the Quadrant of a point || Conditional Statement || Python

In this we are going to see a program to find the Quadrant of a point in Python Programming Language.


co_ord1 = int(input("x : "))
co_ord2 = int(input("y : "))
if co_ord1 > 0 and co_ord2 > 0:
    print(f"The Co-ordinates ({co_ord1},{co_ord2}) Are In I Quadrant")
elif co_ord1 < 0 and co_ord2 < 0:
    print(f"The Co-ordinates ({co_ord1},{co_ord2}) Are In III Quadrant")
elif co_ord1 < 0 and co_ord2 > 0:
    print(f"The Co-ordinates ({co_ord1},{co_ord2}) Are In II Quadrant")
else:
    print(f"The Co-ordinates ({co_ord1},{co_ord2}) Are In IV Quadrant")

# Coded By DHIRAJ SHELKE


#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post