ShareShortcuts
Fork “BMI Calculator”

Built something new on top of this Shortcut? Share it as a fork: it becomes a Shortcut of your own, which you manage, and both pages link to each other so arirafiq gets credit.

  1. 1Get the Shortcut and change it in the Shortcuts app. Give it a name of its own.
  2. 2Share it from the Shortcuts app and copy the iCloud link.
  3. 3Come back here, paste the link and describe what is different, e.g. “Added a step that uses Apple Intelligence to personalise the text.”
Downloads
54K
Saved
3
Actions
38
Category
Calculations
Version
1.1
Language
EN

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.

Version History
1.1 Mar 24, 2021

Link fixed.

1.0 Jan 23, 2021

First release

What it does

38 actions
  1. Comment
    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.
  2. Choose from Menu
    Which measurement system do you want?
  3. Choose from Menu
    Standard
  4. Ask for Input
    Enter your height? (Feet)
  5. Set Variable
    Feet
  6. Ask for Input
    And inches?
  7. Set Variable
    Inches
  8. Ask for Input
    Enter your weight? (Pounds)
  9. Set Variable
    Pounds
  10. Calculate
  11. Set Variable
    Rfeet
  12. Calculate
  13. Set Variable
    Rinches
  14. Calculate
  15. Set Variable
    FIHeight
  16. Calculate
  17. Set Variable
    MFIHeight
  18. Calculate
  19. Set Variable
    SMFIHeight
  20. Calculate
  21. Set Variable
    KGWeight
  22. Calculate
  23. Round Number
  24. Set Variable
    BMII
  25. Show Alert
  26. Choose from Menu
    Metric
  27. Ask for Input
    Enter your height? (Centimeter)
  28. Set Variable
    Height
  29. Ask for Input
    Enter your weight? (Kilogram)
  30. Set Variable
    Weight
  31. Calculate
  32. Set Variable
    Hmeter
  33. Calculate
  34. Set Variable
    Hsquare
  35. Calculate
  36. Round Number
  37. Set Variable
    BMI
  38. Show Alert

View as code
Beta

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

See All

You Might Also Like

See All
Advertisement