Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Mar 28th, 2020 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def if_internal_tangents_helper(x,y,r,x2,y2,r2):
  2.     a = abs(x - x2)
  3.     b = abs(y - y2)
  4.     c = math.sqrt(a * a + b * b)
  5.     if c+r == r2:
  6.         return True
  7.     return False
  8.  
  9. def if_internal_tangents(p1, p2):
  10.     return if_internal_tangens_helper(p1[0], p1[1], p1[2], p2[0], p2[1], p2[2])
  11.  
  12. def zad_3(lista):
  13.     wynik = []
  14.     for i in range(0,len(lista)):
  15.         for y in range(0,len(lista)):
  16.             if i != y:
  17.                 if if_external_tangents(lista[i], lista[i])
  18.                     wynik.append([lista[i],lista[y]])
  19.     return wynik
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top