Created
January 8, 2015 12:26
-
-
Save hellerve/a0efebe2d60398090354 to your computer and use it in GitHub Desktop.
An example bingo program
This file contains 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
secret_number gets between: 1 10 | |
3 times | |
write: Choose a number from 1 to 10. | |
my_number gets ask: > | |
if my_number is @secret_number | |
write: You win! The number was @secret_number. | |
quit | |
else | |
if my_number > @secret_number | |
write: Try a smaller number. | |
else | |
write: Try a bigger number. | |
end | |
end | |
end | |
write: The number was @secret_number. | |
write: Better luck next time. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment