Thanks a lot for your reply!
I tried your suggestions, but it did not work on my computer.
1. I think the except following the first try are not performed, since I added a code in the except block, it was not shown in the output.
2. The "exec(init_code)" produced a "None" value, since I modified this code to
-------------------------------------
print(exec(init_code))
-------------------------------------
In the output, the word "None" showed up. So I think, the reason the whole try.py file not working is this code "exec(init_code)" just produces None.
3. For the except code following the first try, I changed to
--------------------------------------
except as e
--------------------------------------
but, my computer said it is invalid syntax.
4. The interest.py file contains much more things that are not directly related to this question, so I think it would be clearer to make a concentrated file.
5. The Python tutorial is wonderful, but it is too general. Not specific for my question. I have already tried to find my answers in this tutorial, but I could not find it.