Scan med din iPhone for at installere
Play The Game, it’s fun.
Nyheder
Version 1.0
First release
Hvad den gør
29 handlinger-
CommentThis shortcut is public. View it at https://shortcutstudio.app/marketplace-item.html?id=309eee8f-5512-4fe5-82e1-e70551a242d7
-
Number
-
Set VariableuserScore
-
Number
-
Set VariableshortcutScore
-
Random Number
-
Ask for InputGuess the shortcut's number (1-10):
-
Text
-
Text
-
Text
-
If
-
Calculate
-
Set VariableuserScore
-
Show Result
-
If
-
Show Result
-
Ask for InputChoose a number for the shortcut to guess (1-10):
-
Random Number
-
Text
-
Text
-
Text
-
If
-
Calculate
-
Set VariableshortcutScore
-
Show Result
-
If
-
Show Result
-
Text
-
Show Result
Vis som kode
Alle genvejens handlinger skrevet ud i Cherri, et programmeringssprog til genveje. Perfekt til at lære, hvordan den virker.
#define glyph magicWandAlt
// This shortcut is public. View it at https://shortcutstudio.app/marketplace-item.html?id=309eee8f-5512-4fe5-82e1-e70551a242d7
@userScore = 0
@shortcutScore = 0
const ShortcutNumber = randomNumber(1, 10)
const UserGuess = prompt("Guess the shortcut's number (1-10):", "Number", false)
const Text_userGuess = "{}"
const Text_shortcutNumber = "{ShortcutNumber}"
if Text_userGuess == Text_shortcutNumber {
@userScore = @userScore + 15
show("Correct! You get 15 points.")
} else {
show("Wrong! You get 0 points.")
}
const UserNumber = prompt("Choose a number for the shortcut to guess (1-10):", "Number", false)
const ShortcutGuess = randomNumber(1, 10)
const Text_shortcutGuess = "{ShortcutGuess}"
const Text_userNumber = "{}"
if Text_shortcutGuess == Text_userNumber {
@shortcutScore = @shortcutScore + 15
show("Shortcut guessed your number! Shortcut gets 15 points.")
} else {
show("Shortcut guessed wrong! Shortcut gets 0 points remain 0.")
}
const FinalText = "Final Scores:\nYou: {@userScore}\nShortcut: {@shortcutScore}"
show(FinalText)
Åbn i Cherri Playground
Dekompileret med cherri 2.3.0 (GPL-2.0). Kan kræve små rettelser, før den kan kompileres.
Bedømmelser og anmeldelser
Skriv en anmeldelse–
ud af 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Ingen anmeldelser endnu. Vær den første!
Annonce
Mere fra boomchickaboomboom
Du vil måske også kunne lide
Annonce