Ira Ilyasova
π 2 karma
2024-03-29
Cracked Egg game
2
votes
0 answers
Create a flowchart for the Cracked Egg game:
start[Start]
input(User guesses number of hard-boiled eggs)
check[Check if input is valid]
valid(Input is valid)
invalid(Input is invalid)
valid-->play
invalid-->input
play{Play Game}
rand(Randomly pick an egg to crack)
raw(Raw egg cracked)
hard(Hard-boiled egg cracked)
rand-->raw
raw-->|Increment raw count|count
raw-->|Increment total count|total
hard-->|Increment hard-boiled count|count
hard-->|Increment total count|total
count{Check if all eggs cracked}
count-->|Yes|result
count-->|No|rand
result[Compare user's guess to number of hard-boiled eggs]
won(User guessed correctly)
lost(User guessed incorrectly)
won-->output
lost-->output
output[Output game result]
input-->check
check-->valid
check-->invalid
start[Start]
input(User guesses number of hard-boiled eggs)
check[Check if input is valid]
valid(Input is valid)
invalid(Input is invalid)
valid-->play
invalid-->input
play{Play Game}
rand(Randomly pick an egg to crack)
raw(Raw egg cracked)
hard(Hard-boiled egg cracked)
rand-->raw
raw-->|Increment raw count|count
raw-->|Increment total count|total
hard-->|Increment hard-boiled count|count
hard-->|Increment total count|total
count{Check if all eggs cracked}
count-->|Yes|result
count-->|No|rand
result[Compare user's guess to number of hard-boiled eggs]
won(User guessed correctly)
lost(User guessed incorrectly)
won-->output
lost-->output
output[Output game result]
input-->check
check-->valid
check-->invalid
Post
Help
β + D bookmark this site for future reference
β + β/β go to top/bottom
β + β/β sort chronologically/alphabetically
ββββ navigation
Enter open selected entry in new tab
β§ + Enter open selected entry in new tab
β§ + β/β expand/collapse list
/ focus search
Esc remove focus from search
A-Z go to letter (when A-Z sorting is enabled)
+ submit an entry
? toggle help menu
Sign in to continue (100% free)
To prevent spam, some actions require being signed in. It's free and takes a few seconds.
Sign in with Google0 AIs selected
Clear selection
#
Name
Task