+ 1

Python code (numbers in a pattern){solved}

Please help me to get an output like - 1 1 12 21 12321 if my input number is 3. Tried many times 😕 Please help

2nd Oct 2020, 1:47 PM
Sreenandan K M
Sreenandan K M - avatar
4 Answers
+ 2
Run two for loops ,calculate initial spaces and then insert it between two loops and decrement the initial_spaces by 2 at the end Edit: if the pattern input is double digit number then you have to recalculate spaces https://code.sololearn.com/csq0qfum888q/?ref=app
2nd Oct 2020, 2:17 PM
Abhay
Abhay - avatar
+ 2
Post your try...
2nd Oct 2020, 1:59 PM
Jayakrishna 🇼🇳
+ 2
Thanks a lot Abhay 😊
2nd Oct 2020, 2:40 PM
Sreenandan K M
Sreenandan K M - avatar
+ 1
👍
2nd Oct 2020, 2:42 PM
Abhay
Abhay - avatar