can someone enlighten me with this practice!!! Thank you. Medical Software | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

can someone enlighten me with this practice!!! Thank you. Medical Software

This is my code on Medical Software practice in Introduction to Python. This is my attempt, i got test case 2,3 correct and 1 was fail. # Glucose level is an input for this software glucose_level = int(input()) if glucose_level <=70: # Display message if glucose level is less than 70 print("Low glucose level") # Display message if glucose level is greater than 140 if glucose_level > 140: print("High glucose level") # Display message if none of the conditions above are met else: print("Normal range")

29th Aug 2023, 12:50 PM
Minh Duc Vu
3 Answers
+ 5
what will be the output if the input is 60? then the first condition is true and the last on and so you get two outputs. see the attachment, but this is wrong. you need only one output. do you learnd already someting about the elif statement? https://code.sololearn.com/cDGisZ7vnCC8/?ref=app
29th Aug 2023, 1:25 PM
Angela
Angela - avatar
+ 2
num = 60 glucose_level = int (input()) if glucose_level <= 70: print ("Low glucose_level") elife glucose_level > 140: print ("High glucose_level") else: print ("Normal range") this working
30th Sep 2023, 6:12 PM
AMIR H R A<ヾ(@^▽^@)ノ >LION 💪
AMIR  H  R A<ヾ(@^▽^@)ノ >LION 💪 - avatar
+ 1
thank you so much, i solved that practice, i should ve focused more on elif
30th Aug 2023, 3:17 AM
Minh Duc Vu