My code learn from http://inventwithpython.com/