You are viewing a single comment's thread. Return to all comments →
n = str(input("What is your name")) a = "" b = "" for x in range(len(n)): if x%2 == 0: a+=n[x] elif x%2 != 0: b+=n[x] print(a+""+b)
This is my code. it gives right output in pycharm but why cant i pass the test cases?/ anyoone please help
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Day 6: Let's Review
You are viewing a single comment's thread. Return to all comments →
n = str(input("What is your name")) a = "" b = "" for x in range(len(n)): if x%2 == 0: a+=n[x] elif x%2 != 0: b+=n[x] print(a+""+b)
This is my code. it gives right output in pycharm but why cant i pass the test cases?/ anyoone please help