-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
The three rules of Ruby Q.:
-
Please do not post any solutions or spoiler discussion for this
quiz until 48 hours have elapsed from the time this message was
sent. -
Support Ruby Q. by submitting ideas and responses
as often as you can. -
Enjoy!
Suggestion: A [QUIZ] in the subject of emails about the problem
helps everyone on Ruby T. follow the discussion. Please reply to
the original quiz message, if you can.
RSS Feed: http://rubyquiz.strd6.com/quizzes.rss
Suggestions?: http://rubyquiz.strd6.com/suggestions
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Random Points within a Circle (#234)
Greetings Rubyists,
Generating random numbers is a useful feature and Ruby provides us
with Kernel.rand
to generate numbers uniformly distributed between
zero and one. If we want to generate random numbers with other
distributions, then we’ll need to do a little work. The quiz this week
is to generate random points uniformly distributed within a circle of
a given radius and position.
This quiz is relatively simple, great if you are new to Ruby or
strapped for time. Remember, it is contributions from people like
you that make Ruby Q. succeed!
Have fun!