Solving Problem 1 of Project Euler

As I understand it, Oppia.org, a project made by Google engineers, is about adaptive learning. Since there is a lot of merit in such an approach and since I am already familiar with such an approach from Microsoft’s exams, I thought I’d try it.

Well, it is still in beta and not impressive, but I wanted to show Oppia.org’s response of my attempt to solve Problem 1 of Project Euler that Oppia.org features.

Before I show you Oppia.org’s response, I would like to state Problem1 of Project Euler:

Find the sum of all multiples of 3 or 5 below 1000.

I would also like to give you the Haskell one-liner I used to solve it:

sum [x | x <- [1..999], (x `mod` 3 == 0 || x `mod` 5 == 0)]

and the result, which is 233168.

Below is the screenshot from my use of WinGHCi:

WinGHCi

And here is my use of Oppia.org’s dialog driven approach:

Oppia_-_Reader_View_-_2014-03-03_13.27.40

Although it seems that Oppia.org understands Haskell, it doesn’t. In fact it wants Python code in order to be able to run it. You can put any invalid (Haskell or other) code there and the response will be the same. So, Oppia.org is very unimpressive at its present form. And I do not have high hopes that it will impress me in the future. We’ll see if I am proven correct or incorrect in the future.

Finally, if you want to calculate the same thing using Excel, put the numbers 1 to 999 in the first column from cell A1 to cell A999, and put the formula

=IF(OR(MOD(A1,3)=0,MOD(A1,5)=0),A1,0)

in the cell B1 and copy it all the way down including cell B999. Sum the second column’s cells and the result will be 233168.

About Dimitrios Kalemis

I am a systems engineer specializing in Microsoft products and technologies. I am also an author. Please visit my blog to see the blog posts I have written, the books I have written and the applications I have created. I definitely recommend my blog posts under the category "Management", all my books and all my applications. I believe that you will find them interesting and useful. I am in the process of writing more blog posts and books, so please visit my blog from time to time to see what I come up with next. I am also active on other sites; links to those you can find in the "About me" page of my blog.
This entry was posted in Development. Bookmark the permalink.