Calculating BMI
Aufgabe
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.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 3. Kapitel 5
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen
Suggested prompts:
Zusammenfassen Sie dieses Kapitel
Code in file erklären
Erklären, warum file die Aufgabe nicht löst
Awesome!
Completion rate improved to 4.35
Calculating BMI
Swipe um das Menü anzuzeigen
Aufgabe
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.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 3. Kapitel 5
single