Preview
This calculator provides body mass index (BMI) and the corresponding BMI weight status category for adults 20 years and older.
What's New
Version 1.1
Link fixed.
What it does
38 actions-
CommentAuthor: Ari R. Abdulla Usage: - This calculator provides body mass index (BMI) and the corresponding BMI weight status category for adults 20 years and older.
-
Choose from MenuWhich measurement system do you want?
-
Choose from MenuStandard
-
Ask for InputEnter your height? (Feet)
-
Set VariableFeet
-
Ask for InputAnd inches?
-
Set VariableInches
-
Ask for InputEnter your weight? (Pounds)
-
Set VariablePounds
-
Calculate
-
Set VariableRfeet
-
Calculate
-
Set VariableRinches
-
Calculate
-
Set VariableFIHeight
-
Calculate
-
Set VariableMFIHeight
-
Calculate
-
Set VariableSMFIHeight
-
Calculate
-
Set VariableKGWeight
-
Calculate
-
Round Number
-
Set VariableBMII
-
Show Alert
-
Choose from MenuMetric
-
Ask for InputEnter your height? (Centimeter)
-
Set VariableHeight
-
Ask for InputEnter your weight? (Kilogram)
-
Set VariableWeight
-
Calculate
-
Set VariableHmeter
-
Calculate
-
Set VariableHsquare
-
Calculate
-
Round Number
-
Set VariableBMI
-
Show Alert
View as code
Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.
#include 'actions/math'
#define color teal
#define glyph calculator
/*
Author: Ari R. Abdulla
Usage:
- This calculator provides body mass index (BMI) and the corresponding BMI weight status category for adults 20 years and older.
*/
menu "Which measurement system do you want?" {
item "Standard":
prompt("Enter your height? (Feet)", "Number")
@Feet
prompt("And inches?", "Number")
@Inches
prompt("Enter your weight? (Pounds)", "Number")
@Pounds
@Rfeet = @Feet * 30.48
@Rinches = @Inches * 2.54
@FIHeight = @Rfeet + @Rinches
@MFIHeight = @FIHeight / 100
@SMFIHeight = @MFIHeight … nil
@KGWeight = @Pounds / 2.205
const CalculationResult = @KGWeight / @SMFIHeight
ceil(CalculationResult, "Tenths")
@BMII
confirm("Your BMI is: {@BMII}\nBMI Categories:\nUnderweight = <18.5\nNormal weight = 18.5-24.9\nOverweight = 25-29.9\nObesity = >30")
item "Metric":
prompt("Enter your height? (Centimeter)", "Number")
@Height
prompt("Enter your weight? (Kilogram)", "Number")
@Weight
@Hmeter = @Height / 100
@Hsquare = @Hmeter … nil
const CalculationResult1 = @Weight / @Hsquare
ceil(CalculationResult1, "Tenths")
@BMI
confirm("Your BMI is: {@BMI}\nBMI Categories:\nUnderweight = <18.5\nNormal weight = 18.5-24.9\nOverweight = 25-29.9\nObesity = >30")
}
Open in Cherri Playground
Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.
Ratings & Reviews
Write a Review–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings
No reviews yet. Be the first to share what you think!
Advertisement
More by arirafiq
You Might Also Like
Advertisement