Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. def diagnostico(tupla):
  2. dhematies={"H":(4.5,6),"M":(4.5,5),"N":(3.9,5.3)}
  3. dhemoglobina={"H":(14,16),"M":(12,14),"N":(10.3,15)}
  4. dhematocrito={"H":(40,45),"M":(35,45),"N":(30,40)}
  5. tcorpuscular={80,95}`
  6.  
  7. for clave, valor in dhematies.items():
  8. if clave in tupla:
  9. if tupla[1:2]<valor:
  10. print("B")
  11. if tupla[1:2]>valor:
  12. print("A")
  13.  
  14. for clave, valor in dhemoglobina.items():
  15. if clave in tupla:
  16. if tupla[2:3]<valor:
  17. print("B")
  18. if tupla[2:3]>valor:
  19. print("A")
  20.  
  21. for clave, valor in dhematocrito.items():
  22. if clave in tupla:
  23. if tupla[3:4]<valor:
  24. print("B")
  25. if tupla[3:4]>valor:
  26. print("A")
  27. #falta añadir el volumen corpuscular
  28. return #no esta definido que devuelve la funcion aun
  29.  
  30.  
  31. tupla_paciente=("H",4.2,12,34,70)
  32.  
  33. print(tupla_paciente,diagnostico(tupla_paciente)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement