-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex2.py
More file actions
20 lines (18 loc) · 734 Bytes
/
ex2.py
File metadata and controls
20 lines (18 loc) · 734 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# programme principal -----------------------------------------------
p_seuil, v_seuil = 2.3, 7.41
print("Seuil pression :", p_seuil, "\tSeuil volume ;", v_seuil, "\n")
pression = float(input("Pression courante = "))
volume = float(input("Volume courant = "))
if (pression > p_seuil) and (volume > v_seuil):
print("\t pression ET volume eleves. Stoppez !")
elif pression > p_seuil:
print("\t Il faut augmenter le volume")
elif volume > v_seuil:
print("\t Vous pouvez diminuer le volume")
else:
print("\t Tout va bien !")
print("--------------------------------------")
n = int(input("Entrez un entier [1 .. 10] : "))
while not(1 <= n <= 10):
n = int(input("Entrez un entier [1 .. 10], S.V.P. : "))
print("\nValeur saisie :", n)