Blood Pressure Measurement

Run Settings
LanguagePython
Language Version
Run Command
while True: try: m=int(input("請輸入血壓的上額值:")) print(m) n=int(input("請輸入血壓的下額值:")) print(n) except ValueError as e: print() print("只輸入血壓上額值及下額值的數字!") else: if m<120 and n<80: print(f"你的血壓上額值是 {m} 及血壓上額值是 {n},血壓值:{m}/{n}") print("血壓理想!") elif m>=120 and m<=129 or n>=80 and n<=84: print(f"你的血壓上額值是 {m} 及血壓上額值是 {n},血壓值:{m}/{n}") print("血壓正常!") elif m>=130 and m<=139 or n>=85 and n<=89: print(f"你的血壓上額值是 {m} 及血壓上額值是 {n},血壓值:{m}/{n}") print("血壓正常至偏高!") else: print(f"你的血壓上額值是 {m} 及血壓上額值是 {n},血壓值:{m}/{n}") print("高血壓!請盡快約見醫生!") o=input("是否繼續輸入?") print(o) if o in "No": break
Editor Settings
Theme
Key bindings
Full width
Lines