Ashna S. schrieb:
> but the code is not working properly
This is a very precise description. Not.
Describe, what you expect the code to do.
Describe, what the code does instead.
Change the code by inserting log outputs (or whatever your programming
environment has instead of it) so that you can follow your code's
execution step by step.
Check if your programming environment has a debugger, use that.
> I have tried several methods of troubleshooting
> but have not been able to solve the problem.
Did any of these several methods give you any information, any error
messages or similar?
Did you read the documentation?