input ten values and get the average temperature for that day. if the average temperature value is in between 970Fahrenheit and 990 Fahrenheit then display the message “Your body temperature is normal…”. If it is more than 104.0 Fahrenheit then display the message “You have a fever caused by an infection or illness…
line = input("Get temperature values: ")
temps = [float(s) for s in line.split()]
avg_temp = sum(temps) / len(temps)
print(f'You average temperature is {avg_temp:6.2f} F')
if 97 <= avg_temp <= 99:
print('Your body temperature is normal…')
if avg_temp > 104:
print('You have a fever caused by an infection or illness…')
Comments
Leave a comment