第26937题 单选题
有关给定Python代码的说法正确的是?
class Point:
    def __init__(self,X,Y):
        self.x = X
        self.y = Y

class Rect:
    def __init__(self,lefttop_Point,rightbottom_Point):
        self.left_top = lefttop_Point
        self.right_bottom = rightbottom_Point
    def __contains__(self,xy):
        if self.left_top.x <= xy.x <= self.right_bottom.x \
                and self.right_bottom.y <= xy.y <= self.left_top.y:
            return True
        return False

rectA = Rect(Point(10,10),Point(20,5))
print(Point(15,8) in rectA)
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析