dimanche 29 novembre 2020

How to use an if function with a range of two float numbers [duplicate]

Could someone help me on making a range between two decimal numbers say 18.5 to 24.9? So basically what I wanted to do is this

If BMI in range(18.5, 24.9) print("good you are healthy")

Yet it would not allow me to do this. When I tried to do this it said expected int got float instead. Do note I am a beginner here so do bear with me. Any help would really be appreciated. Thanks.

Aucun commentaire:

Enregistrer un commentaire