猿问

python象限问题!求求大神帮帮忙!

波斯汪
浏览 1633回答 1
1回答

冉冉说

while True:    x = input("x:")    if x.isalpha:        print("exit)        break    y = input("y:")    if y.isalpha:        print("exit)        break    x,y = int(x),int(y)    if x>0:        if y > 0:            print("Q1")        elif y < 0:            print("Q4")        else:            print(x,y)    elif x < 0:        if y > 0:            print("Q2")        elif y < 0:            print("Q3")        else:            print(x,y)    else:        print(x,y)最小白式的写法了,没有任何高级语句或者巧妙写法。。这还看不懂,趁早放弃写代码
随时随地看视频慕课网APP

相关分类

Python
我要回答