+ 1

How to obtain this pattern as a output in python

I * *** ***** ******* *********

3rd Sep 2019, 4:01 PM
Kshitij Gangwar
Kshitij Gangwar - avatar
2 ответов
+ 1
n = int(input()) n = 3 if n < 3 else n for i in range(n): sp = ' '*(n-i) print(sp + '*'*(2*i+1)+sp)
3rd Sep 2019, 4:11 PM
RZK 022
RZK 022 - avatar
+ 1
Use loops - for / while. 1 loop to print row elements. 2 loop to print columns. 1st loop inside the 2nd loop.
3rd Sep 2019, 4:14 PM
Kuri
Kuri - avatar