Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math;
- class Punkt:
- pass
- def main():
- p=Punkt()
- k=Punkt()
- p.x=-20;
- p.y=22;
- p.z=3;
- k.x=-31;
- k.y=12;
- k.z=5;
- dx=k.x-p.x;
- dy=k.y-p.y;
- dz=k.z-p.z;
- print("dx= " ,dx)
- print("dy= " ,dy)
- print("dz= ", dz)
- dl=math.sqrt(dx*dx+dy*dy+dz*dz)
- print("dlugosc to ", dl)
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement