ShareShortcuts

Guess the number!!

You can guess a number!

gooey321
Fork “Guess the number!!”

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 gooey321 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
55K
Saved
2
Actions
143
Category
Fun
Version
1.1
Language
EN

You can guess a number!

What's New

Version 1.1

Custom chances for 1-5 and 1-10

Version History
1.1 Aug 13, 2021

Custom chances for 1-5 and 1-10

1.0 Dec 7, 2020

First release

What it does

143 actions
  1. Comment
    This update comes with custom chances for 1-5 and 1-10
  2. Dictionary
  3. Choose from Menu
    What between?
  4. Choose from Menu
    1-5 🟢
  5. Ask for Input
    How many chances?
  6. Set Variable
    Chances 1
  7. Random Number
  8. Set Variable
    5
  9. Repeat
  10. Ask for Input
    Guess a number between 1-5
  11. If
  12. Show Result
  13. If
  14. Show Result
  15. Choose from Menu
  16. Choose from Menu
    Go again?
  17. Run Shortcut
    Guess the number! 2
  18. Choose from Menu
    Exit?
  19. Stop This Shortcut
  20. Choose from Menu
    1-10 🟢
  21. Ask for Input
    How many chances?
  22. Set Variable
    Chances 2
  23. Random Number
  24. Set Variable
    10
  25. Repeat
  26. Ask for Input
    Guess a number between 1-10
  27. If
  28. Show Result
  29. If
  30. Show Result
  31. Choose from Menu
  32. Choose from Menu
    Go again?
  33. Run Shortcut
    Number
  34. Choose from Menu
    Exit?
  35. Stop This Shortcut
  36. Choose from Menu
    1-15 🔵
  37. Random Number
  38. Set Variable
    15
  39. Ask for Input
    Guess in between 1-15
  40. If
  41. Show Result
  42. If
  43. Show Result
  44. Choose from Menu
  45. Choose from Menu
    Go again?
  46. Run Shortcut
    Guess the number! 2
  47. Choose from Menu
    Exit?
  48. Stop This Shortcut
  49. Choose from Menu
    1-20 🔵
  50. Random Number
  51. Set Variable
    20
  52. Ask for Input
    Guess a number between 1-20
  53. If
  54. Show Result
  55. If
  56. Show Result
  57. Choose from Menu
  58. Choose from Menu
    Play again?
  59. Run Shortcut
    Guess the number! 2
  60. Choose from Menu
    Exit?
  61. Stop This Shortcut
  62. Choose from Menu
    1-30 🟣
  63. Random Number
  64. Set Variable
    30
  65. Ask for Input
    Guess a number between 1-30
  66. If
  67. Show Result
  68. If
  69. Show Result
  70. Choose from Menu
  71. Choose from Menu
    Play again?
  72. Run Shortcut
    Guess the number! 2
  73. Choose from Menu
    Exit?
  74. Stop This Shortcut
  75. Choose from Menu
    1-50 🟣
  76. Random Number
  77. Set Variable
    50
  78. Ask for Input
    Guess a number between 1-50
  79. If
  80. Show Result
  81. If
  82. Show Result
  83. Choose from Menu
  84. Choose from Menu
    Play again?
  85. Run Shortcut
    Guess the number! 2
  86. Choose from Menu
    Exit?
  87. Stop This Shortcut
  88. Choose from Menu
    1-100 🔴
  89. Random Number
  90. Set Variable
    100
  91. Ask for Input
    Guess a number between 1-100
  92. If
  93. Show Result
  94. If
  95. Show Result
  96. Choose from Menu
  97. Choose from Menu
    Play again?
  98. Run Shortcut
    Guess the number! 2
  99. Choose from Menu
    Exit?
  100. Stop This Shortcut
  101. Choose from Menu
    1-500 🔴
  102. Random Number
  103. Set Variable
    500
  104. Ask for Input
    Guess a number between 1-500
  105. If
  106. Show Result
  107. If
  108. Show Result
  109. Choose from Menu
  110. Choose from Menu
    Play again?
  111. Run Shortcut
    Guess the number! 2
  112. Choose from Menu
    Exit?
  113. Stop This Shortcut
  114. Choose from Menu
    1-1000 ⚫️
  115. Random Number
  116. Set Variable
    1000
  117. Ask for Input
    Guess a number between 1-1000
  118. If
  119. Show Result
  120. If
  121. Show Result
  122. Choose from Menu
  123. Choose from Menu
    Play again?
  124. Run Shortcut
    Guess the number!!
  125. Choose from Menu
    Exit?
  126. Stop This Shortcut
  127. Choose from Menu
    Custom number ⚪️
  128. Ask for Input
    What is the minimum number?
  129. Set Variable
    Min
  130. Ask for Input
    What is the maximum number?
  131. Set Variable
    Max
  132. Random Number
  133. Set Variable
    Custom
  134. Ask for Input
    Guess a random number between …-…
  135. If
  136. Show Result
  137. If
  138. Show Result
  139. Choose from Menu
  140. Choose from Menu
    Play again?
  141. Run Shortcut
    Guess the number!!
  142. Choose from Menu
    Exit?
  143. Stop This Shortcut

View as code
Beta

Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.

#define color green
#define glyph circledCheckmark

// This update comes with custom chances for 1-5 and 1-10


menu "What between?" {
item "1-5 🟢":
	prompt("How many chances?", "Number")
	@Chances1
	randomNumber(1, 5)
	@5
	repeat _ for @Chances1 {
		const ProvidedInput = prompt("Guess a number between 1-5", "Number")
		if ProvidedInput == @5 {
			show("You win!")
		} else {
		}
	}
	show("You lost.")
	menu nil {
	item "Go again?":
		runSelf()
	item "Exit?":
		stop()
	}
item "1-10 🟢":
	prompt("How many chances?", "Number")
	@Chances2
	randomNumber(1, 10)
	@10
	repeat _ for @Chances2 {
		const ProvidedInput1 = prompt("Guess a number between 1-10", "Number")
		if ProvidedInput1 == @10 {
			show("You win!")
		} else {
			show("You lost.")
		}
	}
	menu nil {
	item "Go again?":
		runSelf()
	item "Exit?":
		stop()
	}
item "1-15 🔵":
	randomNumber(1, 15)
	@15
	const ProvidedInput2 = prompt("Guess in between 1-15", "Number")
	if ProvidedInput2 == @15 {
		show("You win!")
	} else {
		show("You lost the number was {}")
	}
	menu nil {
	item "Go again?":
		runSelf()
	item "Exit?":
		stop()
	}
item "1-20 🔵":
	randomNumber(1, 20)
	@20
	const ProvidedInput3 = prompt("Guess a number between 1-20", "Number")
	if ProvidedInput3 == @20 {
		show("You win!")
	} else {
		show("You lost the number was {}")
	}
	menu nil {
	item "Play again?":
		runSelf()
	item "Exit?":
		stop()
	}
item "1-30 🟣":
	randomNumber(1, 30)
	@30
	const ProvidedInput4 = prompt("Guess a number between 1-30", "Number")
	if ProvidedInput4 == @30 {
		show("You win")
	} else {
		show("You loose the random number was {@30}")
	}
	menu nil {
	item "Play again?":
		runSelf(ProvidedInput4)
	item "Exit?":
		stop()
	}
item "1-50 🟣":
	randomNumber(1, 50)
	@50
	const ProvidedInput5 = prompt("Guess a number between 1-50", "Number")
	if ProvidedInput5 == @50 {
		show("You win!")
	} else {
		show(ProvidedInput5)
	}
	menu nil {
	item "Play again?":
		runSelf()
	item "Exit?":
		stop()
	}
item "1-100 🔴":
	randomNumber(1, 100)
	@100
	const ProvidedInput6 = prompt("Guess a number between 1-100", "Number")
	if ProvidedInput6 == @100 {
		show("You win!")
	} else {
		show("You lost the random number was {} and you said {ProvidedInput6}")
	}
	menu nil {
	item "Play again?":
		runSelf()
	item "Exit?":
		stop()
	}
item "1-500 🔴":
	randomNumber(1, 500)
	@500
	const ProvidedInput7 = prompt("Guess a number between 1-500", "Number")
	if ProvidedInput7 == @500 {
		show("You win!")
	} else {
		show("You lost the random number was {@500} and you guessed {ProvidedInput7}")
	}
	menu nil {
	item "Play again?":
		runSelf()
	item "Exit?":
		stop()
	}
item "1-1000 ⚫️":
	randomNumber(1, 1000)
	@1000
	const ProvidedInput8 = prompt("Guess a number between 1-1000", "Number")
	if ProvidedInput8 == @1000 {
		show("You win!")
	} else {
		show("You lost the number was {@1000}")
	}
	menu nil {
	item "Play again?":
		runSelf()
	item "Exit?":
		stop()
	}
item "Custom number ⚪️":
	prompt("What is the minimum number?", "Number")
	@Min
	prompt("What is the maximum number?", "Number")
	@Max
	randomNumber(@Min, @Max)
	@Custom
	const ProvidedInput9 = prompt("Guess a random number between {@Min}-{@Max}", "Number")
	if ProvidedInput9 == @Custom {
		show("You win!")
	} else {
		show("You loose the number was {@Custom} and you guessed {ProvidedInput9}")
	}
	menu nil {
	item "Play again?":
		runSelf()
	item "Exit?":
		stop()
	}
}
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 gooey321

See All

You Might Also Like

See All
Advertisement