Learning to Code Python
Written by Guillermo Garron
Date: 2012-02-20 00:10:00 00:00
I have started today, well actually yesterday, as it has elapsed 10 minutes of the new day, to code Python.
I have an idea about programming, but I'm not good at all, I like it, and I've decided to start again my learning process, this time with Python. In the past I have tried Basic (being a child) then C. So far I have found Python easy to work with, my first creation is a simple program to calculate French Amortization System Calculator.
And here is the code I made for it:
c = int(raw_input("Initial Loan: "))
n = int(raw_input("Years of the loan: "))
i = float(raw_input("Annual Interest rate: "))
ii = i/100
x = c * ii * (1 + ii) ** n
y = (1 + ii) ** n - 1
Annual = x / y
Monthly = Annual / 12
print "The annual payment is %s" %(Annual)
print "The monthly payment is %s" %(Monthly)
Why I want to learn Python coding?, just to keep my brain working and healthy, I'm 38 years old, and I think is never late to learn, I'm sure I will never become an expert, as I do not have the time to study too much, but I would like to be able to create at least one tool I could then release as Open Source to the community, and I will be more than happy if my tool is useful to some people.
I have always wanted to be a programmer, ever since I saw WarGames, but I finally ended being an Electronic Engineer, and now working in the sales department, so I should do it at least as a hobby.
After learning a little of Python, I will try a little of ruby, with those two I will be more than happy.
If someone may recommend me some books to start or better yet some free e-books. And also if the order or Python -> Ruby is OK, or maybe I should do it Ruby -> Python.