Answers for "diagnose fever in python"

0

diagnose fever in python

#Get user input on whether they would like to enter the body temperature in F or in C  
temp = input("Would you like to enter your temperature in Celcius or Fahrenheit: ")
if temp.upper() == "C":
    result = input("Enter your body temprature in Celcuis: ")
    r = float(result)
    if r >= 37.8:
        print("You've a fever")
    else:
        print("You don't have a fever")
elif temp.upper() == "F":
    result1 = input("Enter your body temprature in Fahrenheit:")
    r1 = float(result1)
    if r1 >= 100.4:
        print("You've a fever")
    else:
        print("You don't have a fever")
else:
    print("Please enter the correct input")
Posted by: Guest on March-19-2021

Python Answers by Framework

Browse Popular Code Answers by Language