Advertisement
trds

distanta dintre doua puncte

Nov 27th, 2020 (edited)
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. import math
  2. def citire():
  3.     x=int(input("Introdu coordonata x:"))
  4.     y=int(input("Introdu coodonata y:"))
  5.     p=(x,y)
  6.     return p
  7. def distanta(a,b):
  8.     distanta = math.sqrt ((a[0]-a[1] ** b[0]-b[1]) ** 2)
  9.     return distanta
  10.  
  11. a=citire()
  12. print(a)
  13. b=citire()
  14. print(b)
  15.  
  16. x=distanta(a,b)
  17. print(x)
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement