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
| # http://www.youtube.com/watch?v=qjOZtWZ56lc | |
| class Numeric | |
| def is_numberwang? | |
| rand(5) == 0 | |
| end | |
| end | |
| i = 0 | |
| def play(i) | |
| while i < 2 |
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
| puts "Welcome to the Number Vocabulary Test Program" | |
| puts "A simple program for learning your numbers in a foreign language." | |
| words = { | |
| "Japanese" => ['zero','ichi','ni','san','yon','go','roku','shichi','hachi','kyuu','juu','juuichi','juuni','juusan'], | |
| "Spanish" => ['cero','uno','dos','tres','cuatro','cinco','seis','siete','ocho','nueve','diez'], | |
| "German" => ['null','eins','zwei','drei','vier','funf','sechs','sieben','acht','neun', 'zehn'] | |
| } | |
| def play(words) |
NewerOlder