Hai , Kushal , i found a indentation mistake http://pymbook.readthedocs.org/en/latest/operatorsexpressions.html#evaluateequ-py To print the sum each time as shown in the output , it should be indented inside "for" loop . correct me if i am wrong . Sorry , i pinged you in IRC , dint get reply . So , posting here :)