# -*- coding: UTF-8 -*-
# 作者：huanhuilong
# 标题：Python 类创建
# 描述：创建点对象，计算内积

class Point:
    def __init__(self, x, y, z):
        self.x = x
        self.y = y
        self.z = z

    def dot(self, right):
        return self.x*right.x+self.y*right.y+self.z*right.z


if __name__ == '__main__':
    p1 = Point(0, 1, 2)
    p2 = Point(2, 4, 6)
    print(p1.dot(p2))
