Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions