I’ve been learning Python for about a week now using Learn
Python the Hard Way. It isn’t that hard for me yet since I have
a strong SysAdmin background. So it comes somewhat natural for
me. LPTHW is not the best resource for a beginner but it’s a
great start nonetheless. Previously, I haven’t written any code
beyond Hello World and today I was able to write a program that
determines your age. While it’s nothing complicated, I do find
it very encouraging to create something from scratch. # Function
to find current age. def find_age(current_year, birth_year):
print "Subtracting %d - %d" % (current_year, birth_year) return
current_year - birth_year # Get input from user for the current
calendar year. print "What year is it now?" current_year =
int(raw_input("> ")) # Get input from user on the year they were
born. print "What year were you born?" birth_year =
int(raw_input("> ")) # Create a variable of the user's age. age
= find_age(current_year, birth_year) # Display the user's age
after calculation. print "You