Samuel Vermeulen 4 weeks ago
parent
commit
bdff617810
  1. 24
      zone.py
  2. 13
      zone2.py

24
zone.py

@ -1,16 +1,12 @@
nbJetons = int(input())
for loop in range(nbJetons):
jetonX = int(input())
jetonY = int(input())
jauneX = (jetonX >= 0 and jetonX <= 90)
jauneY = (jetonY >= 0 and jetonY <= 70)
bleuX = (jetonX >= 10 and jetonX <= 85)
bleuY = (jetonY >= 10 and jetonY <= 55)
if jauneX and jauneY:
z = "Zone jaune"
if bleuX and bleuY:
z = "Zone bleue"
print(z)
x = int(input())
y = int(input())
if x < 0 or x > 90 or y < 0 or y > 70:
print("En dehors de la feuille")
elif y > 60 and ((x > 15 and x < 45) or (x > 60 and x < 85)):
print("Dans une zone rouge")
elif x > 10 and x < 85 and y > 10 and y < 55 and not(x > 25 and x < 50 and y > 20 and y < 45):
print("Dans une zone bleue")
else:
print("Dans une zone jaune")

13
zone2.py

@ -1,13 +0,0 @@
nbJetons = int(input())
for loop in range(nbJetons):
jetonX = int(input())
jetonY = int(input())
if (jetonX >= 0 and jetonX <= 90) and (jetonY >= 0 and jetonY <= 70) and (jetonX >= 20 and jetonX <= 50 and jetonY >=20 and jetonY <= 45):
z = "Zone jaune"
if (jetonX >= 10 and jetonX <= 85) and (jetonY >= 10 and jetonY <= 55):
z = "Zone bleue"
print(z)
Loading…
Cancel
Save