1 changed files with 11 additions and 4 deletions
@ -1,9 +1,16 @@ |
|||||
|
from math import * |
||||
|
|
||||
def points (x,y): |
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 |
return 3 |
||||
else: |
else: |
||||
return 2 |
return 2 |
||||
|
|
||||
|
print(points (100,400)) |
||||
print(points (200,2)) |
|
||||
|
Loading…
Reference in new issue