本文整理汇总了Python中Point.Point.get_y方法的典型用法代码示例。如果您正苦于以下问题:Python Point.get_y方法的具体用法?Python Point.get_y怎么用?Python Point.get_y使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Point.Point
的用法示例。
在下文中一共展示了Point.get_y方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: print
# 需要导入模块: from Point import Point [as 别名]
# 或者: from Point.Point import get_y [as 别名]
__author__ = 'Vlada'
from Point import Point
from StraightLine import StraightLine
from BrokenLine import BrokenLine
from Polygon import Polygon
print("------------------ CLASS Point TESTING ------------------")
p1 = Point(10, 20)
p2 = Point(15, 25)
p3 = Point(11, 5)
p4 = Point(8, 0)
print("Point p1(%d,%d):" % (p1.get_x(), p1.get_y()))
print("Point p2(%d,%d):" % (p2.get_x(), p2.get_y()))
print("Point p3(%d,%d):" % (p3.get_x(), p3.get_y()))
print("Point p4(%d,%d):" % (p4.get_x(), p4.get_y()))
p1.print_point()
p2.print_point()
p3.print_point()
p4.print_point()
print("Distance between points p1 and (4, 12) is", p1.distance_coord(4, 12))
print("Distance between points (5, 7) and (4, 7)", Point.distance_coord__(5, 7, 4, 7))
print("Distance between points p3 and p4 is %d " % p3.distance_point(p4))
print("Distance between points p1 and p2 is %d " % Point.distance_point__(p1, p2))
p1.set_x(0)