Please Check if my code is correct


added comments for correction
you can view the code