Advertisement
programusy

kod5

Nov 30th, 2022 (edited)
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. import math;
  2. class Punkt:
  3. pass
  4.  
  5. def main():
  6. p=Punkt()
  7. k=Punkt()
  8. p.x=-20;
  9. p.y=22;
  10. p.z=3;
  11. k.x=-31;
  12. k.y=12;
  13. k.z=5;
  14. dx=k.x-p.x;
  15. dy=k.y-p.y;
  16. dz=k.z-p.z;
  17. print("dx= " ,dx)
  18. print("dy= " ,dy)
  19. print("dz= ", dz)
  20. dl=math.sqrt(dx*dx+dy*dy+dz*dz)
  21. print("dlugosc to ", dl)
  22.  
  23. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement