This example will show you how to make a simple function and call it using Thonny Python program.
Example Problem:
Body Mass Index
Design a modular program that calculates and displays a person’s body mass index (BMI). The BMI is often used to determine whether a person with a sedentary lifestyle is overweight or underweight for his or her height. A person’s BMI is calculated with the following formula:
BMI = Weight × 703 / Height^2 (Height squared)