Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Calculating BMI | Strings Formatting
String Manipulation in Python
course content

Зміст курсу

String Manipulation in Python

String Manipulation in Python

1. Basic Concepts
2. String Methods
3. Strings Formatting

Calculating BMI

Завдання

Given dictionary person with three keys: name, weight, and height. Your tasks are:

  1. Add new value to person dictionary with key bmi and value weight/height**2.
  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 a person by respective key.
  3. You need to apply .format() method to info string passing person dictionary as an argument and print the result.

Завдання

Given dictionary person with three keys: name, weight, and height. Your tasks are:

  1. Add new value to person dictionary with key bmi and value weight/height**2.
  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 a person by respective key.
  3. You need to apply .format() method to info string passing person dictionary as an argument and print the result.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 3. Розділ 5
toggle bottom row

Calculating BMI

Завдання

Given dictionary person with three keys: name, weight, and height. Your tasks are:

  1. Add new value to person dictionary with key bmi and value weight/height**2.
  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 a person by respective key.
  3. You need to apply .format() method to info string passing person dictionary as an argument and print the result.

Завдання

Given dictionary person with three keys: name, weight, and height. Your tasks are:

  1. Add new value to person dictionary with key bmi and value weight/height**2.
  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 a person by respective key.
  3. You need to apply .format() method to info string passing person dictionary as an argument and print the result.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 3. Розділ 5
toggle bottom row

Calculating BMI

Завдання

Given dictionary person with three keys: name, weight, and height. Your tasks are:

  1. Add new value to person dictionary with key bmi and value weight/height**2.
  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 a person by respective key.
  3. You need to apply .format() method to info string passing person dictionary as an argument and print the result.

Завдання

Given dictionary person with three keys: name, weight, and height. Your tasks are:

  1. Add new value to person dictionary with key bmi and value weight/height**2.
  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 a person by respective key.
  3. You need to apply .format() method to info string passing person dictionary as an argument and print the result.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Завдання

Given dictionary person with three keys: name, weight, and height. Your tasks are:

  1. Add new value to person dictionary with key bmi and value weight/height**2.
  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 a person by respective key.
  3. You need to apply .format() method to info string passing person dictionary as an argument and print the result.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 3. Розділ 5
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt