ShareShortcuts

Jelly Beans In Jar Calculator

This calculates the amount of jellybeans in a can shape jar

randomshortcuts
Fork “Jelly Beans In Jar 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 randomshortcuts 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
52K
Saved
1
Actions
14
Category
API
Version
1.0
Language
EN

This calculates the amount of jellybeans in a can shape jar

What's New

Version 1.0

First release

Version History
1.0 Apr 11, 2021

First release

What it does

14 actions
  1. Show Alert
  2. Ask for Input
    What is the diameter of the jar?
  3. Ask for Input
    What is the height of the jellybeans in the jar?
  4. Calculate
  5. Calculate
  6. Calculate
  7. Calculate
  8. Calculate
  9. Calculate
  10. Calculate
  11. Round Number
  12. Calculate
  13. Calculate
  14. Show Alert
    Jelly beans in jar

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 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

See All
Advertisement