Here is my code :
Why it is giving me error ?
@yashsharma4304 hey I have corrected your code. see the comments where mistake was made.