Kindly find the mistake and modify the code

@vanshikasharma1645
2 mistakes corrected and commented