Decided to put some coding on the blog itself


Was reading through this blog and found  a nice quote “a program a day keeps skill degradation at bay”. I thought that it pretty good advice so I thought to add coding on my blog itself alongwith downloadable content on my github repo.

def reverse_num(num):
'''returns the reverse of an integer '''
if num < 0:
return - int(str(-num)[::-1])
else:
return int(str(num)[::-1])
def is_palindrome(num):
'''checks whether a number is palindrome or not'''
if str(num) != str(num)[::-1]:
return False
else:
return True
def gcd(num1, num2):
'''Finding GCD of a number '''
'''IMPLEMENTS Euclid's algorithm for finding GCD'''
if num1 == 0 or num2 == 0:
return 0
if num1 >= num2:
a = num1
b = num2
else:
a = num2
b = num1
while b != 0:
c = a % b
a,b = b,c
else:
return a
view raw 00001.py hosted with ❤ by GitHub

Python, java and a lot of resources


Ok so I have continued with codecademy‘s  Python track. Two-third done already.  For anyone reading I would give this suggestion. Codecademy is for beginner’s with no programming experience. It can give you a feel of the language but cannot teach you programming. It’s Python track covers the language basics but could use improvements.

Its 7th Track part-2 Battleship can use a lot of improvements. The instructions miss out on some points like corner cases in case of this project. Also the online judging system lets wrong codes pass through them.

I had the feeling that I would be needing more text on Python to learn it so I started with Python tutorials. They are good so far.

I found listings of a lot of programming resources  on stackoverflow.
Each programming language has an info page which contains listing of a lot of relevant material. I wish I knew that when I started out.

I was focusing on Python for past few days so I gave Java some time. Learned how to make executable files for Java in Netbeans and started experimenting with GUI Builder using JFrames container.

Started project euler by Python


Started a git repository today for the solutions of Project euler by python. I am using codeacademy for learning python. It seems to be good for basics but I have the feeling that it won’t be good enough for learning Python properly. Project Euler and python challenge should give me the required practice. I’ll am looking for other problems for practicing Python. If anyone has any suggestions please drop by.