Challenges : Pattern Double Sided Arrow

Why did my one test case fail ?
My code is :

Hello @Riankk,

Your code is falling for the testcase:
n=1
Expected Output:
1
Your Output:
1
1

Hope, this would help.
Give a like, if you are satisfied.