Jelly Beans In Jar Calculator
This calculates the amount of jellybeans in a can shape jar
randomshortcutsScan with your iPhone to install
This calculates the amount of jellybeans in a can shape jar
What's New
Version 1.0
First release
What it does
14 actions-
Show Alert
-
Ask for InputWhat is the diameter of the jar?
-
Ask for InputWhat is the height of the jellybeans in the jar?
-
Calculate
-
Calculate
-
Calculate
-
Calculate
-
Calculate
-
Calculate
-
Calculate
-
Round Number
-
Calculate
-
Calculate
-
Show AlertJelly beans in jar
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 darkblue
#define glyph magicWand
confirm("This is the jellybean in a jar calculator!")
const ProvidedInput = prompt("What is the diameter of the jar?", "Number")
const ProvidedInput1 = prompt("What is the height of the jellybeans in the jar?", "Number")
const CalculationResult = ProvidedInput / 2
const CalculationResult1 = CalculationResult * CalculationResult
const CalculationResult2 = CalculationResult1 * ProvidedInput1
const CalculationResult3 = CalculationResult2 * 3.1416
const CalculationResult4 = CalculationResult3 * .21875
const CalculationResult5 = CalculationResult4 - CalculationResult3
const CalculationResult6 = CalculationResult5 / .06544986910006544
const RoundedNumber = round(CalculationResult6)
const CalculationResult7 = RoundedNumber - RoundedNumber
alert("There is about {} jelly beans in the jar!", "Jelly beans in jar")
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
You Might Also Like
Advertisement