šPattern coding challenge with one twistš
Iāve been solving some coding challenges since last few days to improve my coding skill. Iāve came across with one question that seems very simple at first, but before I go ahead read the challenge below
It is very simple challange if you use little logic. I wrote code and got same output but test cases got failed. See the code and output below:
Did you find any difference between my output and expected output?
Output is same but why test cases got failed?
Letās see the difference
Ohā¦did you see the difference? One extra spaces causes the test cases to fail.
Now the question is which line of code causes extra spaces. Answer is definitely print statement might have cause extra space. ā end = ā ā ā parameter of print causes that extra space.