Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- #-*- coding: utf-8 -*-
- def eGFR():
- print "Kalkulator eGFR tylko dla osób powyżej 18 r.ż"
- krea = int(raw_input("Kreatynina: "))
- a = int(raw_input("Wiek: "))
- while a < 18:
- a = int(raw_input("Wiek(>18r.ż): "))
- r = raw_input("Afroamerykanin(T/N): ")
- while r not in ("T", "t", "N", "n"):
- r = raw_input("Afroamerykanin(T/N): ")
- s = raw_input("Płeć(M/F): ")
- while s not in ("M", "m", "F", "f"):
- s = raw_input("Płeć(M/F): ")
- EGFR = 186.3 * (krea ** -1.154) * (a ** -0.203)
- if r == "T" or r == "t":
- EGFR = EGFR * 1.212
- if s == "f" or s == "F":
- EGFR = EGFR * 0.742
- if r == "T" or r == "t" and s == "f" or s == "F":
- EGFR = EGFR * 1.212 * 0.742
- return EGFR
- print eGFR()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement