Exercise for Technical Interviews
Switch branches/tags
Nothing to show
Pull request Compare This branch is 1 commit ahead of drewB:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
config
db
doc
lib
log
public
script
spec
vendor
.gitignore
.rspec
.rvmrc
Gemfile
Gemfile.lock
Guardfile
README.rdoc
Rakefile
config.ru

README.rdoc

Magic 8 ball exercise

  1. A Magic 8 ball can be shaken and will return “yes”, “no”, or “maybe.” It should return them evenly (1/3 chance for each).

  2. PlayerA will shake the magic 8 ball until she gets a clear “yes” or “no.”

  3. PlayerB really likes the answer “yes.” He will shake the magic 8 ball up to 3 times to get a “yes.” If he can't get one, he will accept whatever the 3rd answer is.