Advertisement
Guest User

Untitled

a guest
May 26th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. #!/usr/bin/python
  2. #-*- coding: utf-8 -*-
  3. def eGFR():
  4. print "Kalkulator eGFR tylko dla osób powyżej 18 r.ż"
  5. krea = int(raw_input("Kreatynina: "))
  6. a = int(raw_input("Wiek: "))
  7. while a < 18:
  8. a = int(raw_input("Wiek(>18r.ż): "))
  9. r = raw_input("Afroamerykanin(T/N): ")
  10. while r not in ("T", "t", "N", "n"):
  11. r = raw_input("Afroamerykanin(T/N): ")
  12. s = raw_input("Płeć(M/F): ")
  13. while s not in ("M", "m", "F", "f"):
  14. s = raw_input("Płeć(M/F): ")
  15. EGFR = 186.3 * (krea ** -1.154) * (a ** -0.203)
  16. if r == "T" or r == "t":
  17. EGFR = EGFR * 1.212
  18. if s == "f" or s == "F":
  19. EGFR = EGFR * 0.742
  20. if r == "T" or r == "t" and s == "f" or s == "F":
  21. EGFR = EGFR * 1.212 * 0.742
  22. return EGFR
  23. print eGFR()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement