philippot.m 2 weeks ago
parent
commit
0dc7cfc92e
  1. 15
      fonction_points.py

15
fonction_points.py

@ -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…
Cancel
Save