A common exercise, when you're learning a new language, is to make a guessing game. It's a great way to learn control structures, IO, the works.
This is taking the guessing game to a whole new level. This time, you're the one playing the guessing game. And the guessing game is Math.random().
The task is really simple. You make a guess, Math.random() does it's thing, and if you're right 5 times out of 5, you win!
Hint: You guess first.
'매일매일개발 > Codewars' 카테고리의 다른 글
codewars #32 Dubstep (6kyu) (0) | 2018.05.01 |
---|---|
codewars #31 extract file name (6kyu) (0) | 2018.04.30 |
codewars #29 Multiples of 3 or 5 (6kyu) (0) | 2018.04.26 |
codewars #28 Valid Braces (4kyu) (1) | 2018.04.25 |
codewars #27 Follow that Spy (6kyu) (0) | 2018.04.24 |