1 changed files with 11 additions and 4 deletions
@ -1,9 +1,16 @@ |
|||
from math import * |
|||
|
|||
def points (x,y): |
|||
milieu_de_terrain = 300 |
|||
cote_a = x |
|||
cote_b = milieu_de_terrain - y |
|||
|
|||
if 250<x<750: |
|||
r = (cote_a)**2 + (cote_b)**2 |
|||
r = sqrt(r) |
|||
|
|||
if r > 250: |
|||
return 3 |
|||
else: |
|||
return 2 |
|||
|
|||
|
|||
print(points (200,2)) |
|||
|
|||
print(points (100,400)) |
|||
|
Loading…
Reference in new issue