diff --git a/tempalert.py b/tempalert.py index 37b0488..1bac083 100644 --- a/tempalert.py +++ b/tempalert.py @@ -1,10 +1,15 @@ nbMesures = int(input()) tempMin = int(input()) tempMax = int(input()) -temp = int(input()) +temp = 0 +tempValid = True -while temp <= tempMax and temp >= tempMin: - print("Rien à signaler") - temp = int(input()) +while temp <= nbMesures and tempValid: + temperature = int(input()) + tempValid = (tempMin <= temperature and temperature <= tempMax) + if tempValid: + print("Rien à signaler") + else: + print("Alerte !!") -print("Alerte !!") + temp +=1 \ No newline at end of file