Question: Write a Python code program with these conditions HbA1c of 6.5% or higher indicates diabetes. 5.7 to 6.4 indicates pre-diabetes. HbA1c less than 5.7 is
Write a Python code program with these conditions HbA1c of 6.5% or higher indicates diabetes. 5.7 to 6.4 indicates pre-diabetes. HbA1c less than 5.7 is considered normal. Ask the user for their HbA1c level and display if their they are in the normal range, pre-diabetic, or diabetic.
Can someone correct my code l am kind of stuck.
hba1c = int(input("Please enter your HBA1c level: ")) hba1c = number / 100
if hba1c >= 6.5: print ("You are diabetic") elif hba1c > 5.7 and hba1c < 6.4: print ( "You are in pre-diabetic stage") elif hba1c < 5.7: print("You are in normal range") else: print("Please enter a valid number")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
