1 x = float(input("請輸入橫坐標:"))
2 y = float(input("請輸入縱坐標:"))
3 if x > 0 and y > 0:
4 print("該點在第一象限")
5 elif x < 0 and y > 0:
6 print("該點在第二象限")
7 elif x < 0 and y < 0:
8 print("該點在第三象限")
9 elif x > 0 and y < 0:
10 print("該點在第四象限")
11 else:
12 print("該點在原點")
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/178824.html
標籤:Python
