0

Why pattern program is not working in pycharm.

num=int(input("no_of_row?")) i,j=0,0 for i in range (0,num): print() for j in range (0,i+1): print("*",end="") is any thing wrong with this code?

24th Sep 2019, 8:55 AM
Pratul Tripathi
Pratul Tripathi - avatar
3 Answers
+ 3
My pleasure
24th Sep 2019, 10:35 AM
Ipang
+ 2
Always remember to indent your code correctly. Python is strict when it comes to indentation, because it is what defines blocks of code. Fix the indentation problem and the code will run 👍
24th Sep 2019, 10:13 AM
Ipang
+ 1
Thanq
24th Sep 2019, 10:24 AM
Pratul Tripathi
Pratul Tripathi - avatar