Please edit the code in your last post and format it properly. Nested statements should be indented 3-4 spaces. All statements should not start in the first column.
You have forgotten to post your questions about any problems you are having.
--- Update ---
Please explain what the code does and what is wrong with its execution and say what you want the program to do.
Please edit the code in your last post and format it properly. Nested statements should be indented 3-4 spaces. All statements should not start in the first column.
Its hard to read and understand unformatted code. If you want any help testing the code, you need to format it.