taille=input("Entrez votre taille :") taille=float(taille) masse=input("Entrez votre masse :") masse=float(masse) print("Voici votre moyenne :") imc=masse/(taille*taille) if imc>=0 and imc<=18.5: print("Vous êtes maigre !") if imc>=24.9 and imc<=29.9: print("Vous êtes en surpoids !") if imc>=18.5 and imc<=24.9: print("Vous êtes dans la normal :)") if imc>=29.9 and imc<=40: print("Vous êtes obèse") if imc>=40: print("Vous êtes en obèsité morbide") print(imc)
Cette programmation permet de déterminer l’IMC de chacun, pour cela il suffit de copier ce programme sur un logiciel de programmation (ex: Python ; Thonny ;…).