Created
November 13, 2017 01:35
-
-
Save svend/942b1853c9fad55645af157c2e6eec75 to your computer and use it in GitHub Desktop.
Harper's sparkle game
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| echo "harper's sparkle game" | |
| read -rp "What is the sparkle number? " sparkle_number | |
| echo "The sparkle number is $sparkle_number" | |
| current_number=1 | |
| while :; do | |
| read -rp "Enter a number: " number | |
| if [ "$number" != "$current_number" ]; then | |
| echo "You didn't say the right number. Try again!" | |
| continue | |
| fi | |
| current_number=$(($current_number + 1)) | |
| done |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Harper is a boy! This is his first program! It is named Sparkle Game. You can play this game! Dad is saying this to you.