![]() ![]() The first-place winner of the contest solved this challenge with very concise code: def do_stuff(a, b) One of the contest runner-ups used this method in a clear manner: def do_stuff(a, b)įives_sum = 5 * (b_5 + a_5) * (b_5 - a_5 + 1 ) / 2 Of course, if you knew the formula to sum a range of numbers, you could use it to sum a range of numbers and then subtract the multiples of 5. One simple optimization you could do would be to cancel out the positive and negative numbers instead of summing them. Sum Numbers but 5 simply asked for the sum of large ranges of numbers, but you needed to perform some optimizations in order to solve the challenge in Ruby within the time limit. These were the main challenges in the contest. For example, the following code beats Robot Looks Around in 116 turns: class Playerĭef = ("rrrrrrrrrdddllludddllluuuuulll" + Each turn of the game, simply follow the next turn described in the string. Here's a fast and "hack-ish" way to pass the challenges that displayed the room: simply hard-code the steps the Robot should take in a String. The first challenge was trivial, but the other challenges were hard. Half the challenges let you see the room, and half the challenges hid it. Ruby Robot Challenges - This series of challenges involved programming a Ruby Robot to clean the room. Stay tuned for a future tutorial that will guide Rails beginners through this process. Ruby on Rails Challenge - This involved building a simple Rails app quickly. This post will discuss a couple challenges and solutions briefly, and in the future we may look at some additional challenges. Many other participants won other prizes, such as RubyMine licenses, ebooks from Pragmatic Bookshelf, and membership on Learneroo. The Learneroo Ruby Coding Contest ran during US daytime hours, but programmers joined in from all over the world! These were the final contest winners who will receive cash prizes, sponsored by Atlassian Bitbucket: The Goals of Learneroo - How I Hope to Improve Online Education.Kickstarter Success, Thank you Backers!.Programming Bootcamps as an Alternative to Lectures.The Mean, the Median and Startup Equity.Learn Programming by Example and with Challenges.Web Development for Entrepreneurs, Marketers and Biz-devs.Lessons from my Unsuccessful Kickstarter Project.Learneroo on Reddit and the Powers of 10.Interactive Cartoon Guide to Ruby on Rails.Learn Web Development Kickstarter - Q & A.What Programming Language Should You Learn?.Lessons from my Successful Kickstarter Project. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |