Calculating BMI
Tâche
Swipe to start coding
Given dictionary person with three keys: name, weight, and height. Your tasks are:
- Add new value to
persondictionary with keybmiand valueweight/height**2. - Create pattern named
info"name weight is weight kg, height is height m. BMI is bmi". Everything there written in italics is the value of apersonby respective key. - You need to apply
.format()method toinfostring passingpersondictionary as an argument and print the result.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 3. Chapitre 5
single
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Suggested prompts:
Résumer ce chapitre
Expliquer le code dans file
Expliquer pourquoi file ne résout pas la tâche
Génial!
Completion taux amélioré à 4.35
Calculating BMI
Glissez pour afficher le menu
Tâche
Swipe to start coding
Given dictionary person with three keys: name, weight, and height. Your tasks are:
- Add new value to
persondictionary with keybmiand valueweight/height**2. - Create pattern named
info"name weight is weight kg, height is height m. BMI is bmi". Everything there written in italics is the value of apersonby respective key. - You need to apply
.format()method toinfostring passingpersondictionary as an argument and print the result.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 3. Chapitre 5
single