LearnPy Hub
← Loops problems
Hard

Star Pyramid

Print a centered pyramid of n rows. Row i (starting at 1) has n − i spaces followed by 2i − 1 stars.

Input

One integer n ≥ 1.

Output

n lines forming a pyramid.

Sample 1

Input
3
Output
  *
 ***
*****

Sample 2

Input
5
Output
    *
   ***
  *****
 *******
*********
solution.py
Output appears here
Hints
Star Pyramid · Python practice problem · LearnPy Hub