about | help | code help+videos | done | prefs |
spinCoin
You want to flip a coin, but you don't have a coin. But you do have a spinner that has 10 spaces numbered 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. Write a method that returns "heads" if the number spun is 1 through 5, and tails if the number spun is 6 through 10. spinCoin(1) → "heads" spinCoin(6) → "tails" spinCoin(2) → "heads" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 100
Copyright Nick Parlante 2017 - privacy