C++I have been working at learning programing for a while, and am getting to a point where I can actually create and understand what I am doing.  While I am still limited in my skill set, I believe with further practice I will get there soon.

I am actually going over three different languages at the moment.  I am teaching myself Python, I just recently took a class at Penn State on C++, and I want to learn more on Objective C.  I seem to understand the basics of these languages.

I recently received a message via Twitter to check out CodeEval.  I like the site as they have a number of challenges available to you to try out.  I started with something easy, printing all the odd numbers from 1 to 99.  I first did the program in C++, and then again in Python.  Both programs are very small, however the Python code is nearly non-existent.

My solution I am sure is not as efficient as it should be, and I will work a little more on it to actually improve upon it, however it did get the job done.  I would think adding some additional logic into the program to check if the number is even or odd, and then only print the number if it shows it is odd would be the best solution.  However maybe I am just being over critical.

I am including my two versions of the code, the first written in C++, the second in Python.

C++ Version

Python version

I plan on going through as many of the challenges as possible, as I know this will make me a better programmer in the end.  I will continue on with a few more of the easy challenges before moving on to the moderate and difficult challenges.  If you have not see the site, be sure to check it out.  You can also check out my own public profile on CodeEval.

Leave a Reply

Your email address will not be published. Required fields are marked *

14 + 6 =