Create your own mechanical dartboard that gives back your score based on the coordinates of your dart.
Task:
Use the scoring rules for a standard dartboard:
Finish method:
```python
def get_score(x,y):
```
The coordinates are `(x, y)` are always relative to the center of the board (0, 0). The unit is millimeters. If you throw your dart 5 centimeters to the left and 3 centimeters below, it is written as:
```python
score = get_score(-50, -30)
```
Possible scores are:Outside of the board: `"X"`Bull's eye: `"DB"`Bull: `"SB"`A single number, example: `"10"`A triple number: `"T10"`A double number: `"D10"`
A throw that ends exactly on the border of two sections results in a bounce out. You can ignore this because all the given coordinates of the tests are within the sections.
The diameters of the circles on the dartboard are:Bull's eye: `12.70 mm`Bull: `31.8 mm`Triple ring inner circle: `198 mm`Triple ring outer circle: `214 mm`Double ring inner circle: `324 mm`Double ring outer circle: `340 mm`
If you liked this kata, you can continue with: Let's Play Darts: Beat The Power!
import math

STR_MODIFIERS, STR_OUT = "TD", "X"
PI = math.pi
OUT_OF_BORDER, ANGLE_OFFSET = 340.0/2, 2*PI/40
CIRCLES = {(0,12.70): "DB", (12.70,31.8):"SB", (198,214):"T", (324,340):"D"}
PARTS = [6, 13, 4, 18, 1, 20, 5, 12, 9, 14, 11, 8, 16, 7, 19, 3, 17, 2, 15, 10]

def get_score(x,y):
    ans, d = "", (x**2+y**2)**.5
    theta = (math.atan(y/float(x)) + PI*(x<0) + ANGLE_OFFSET + 2*PI) % (2*PI)
    
    if d > OUT_OF_BORDER: return STR_OUT
    for k,v in CIRCLES.items():
        if k[0]/2.0 < d < k[1]/2.0:
            if v not in STR_MODIFIERS: return v
            ans += v
            break
    
    return ans + str(PARTS[int(theta/(2*PI/20))])
import math

STR_MODIFIERS, STR_OUT = "TD", "X"
PI = math.pi
OUT_OF_BORDER, ANGLE_OFFSET = 340.0/2, 2*PI/40
CIRCLES = {(0,12.70): "DB", (12.70,31.8):"SB", (198,214):"T", (324,340):"D"}
PARTS = [6, 13, 4, 18, 1, 20, 5, 12, 9, 14, 11, 8, 16, 7, 19, 3, 17, 2, 15, 10]

def get_score(x,y):
    ans, d = "", (x**2+y**2)**.5
    theta = (math.atan(y/float(x)) + PI*(x<0) + ANGLE_OFFSET + 2*PI) % (2*PI)
    
    if d > OUT_OF_BORDER: return STR_OUT
    for k,v in CIRCLES.items():
        if k[0]/2.0 < d < k[1]/2.0:
            if v not in STR_MODIFIERS: return v
            ans += v
            break
    
    return ans + str(PARTS[int(theta/(2*PI/20))])