-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathacidez.py
47 lines (35 loc) · 897 Bytes
/
acidez.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
def entrada():
while True:
try:
line = float(input())
if line == -1.0:
break
else:
consulta(line)
except:
break
def consulta(line):
if 0 < line <= 6.9:
print("ACIDA")
elif 7.1<= line <= 14.0:
print("BASICA")
elif line == 7.0:
print("NEUTRA")
def entrada():
while True:
try:
line = float(input())
if line == -1.0:
break
else:
consulta(line)
except:
break
def consulta(line):
if 0 < line <= 6.9:
print("ACIDA")
elif 7.1<= line <= 14.0:
print("BASICA")
elif line == 7.0:
print("NEUTRA")
entrada()