LearnPy Hub
← Introduction & print() problems
Hard

Draw a House

Read n (≥ 2) and draw a roof of n rows (row i has 2i − 1 stars, centred) followed by n rows of the body, each | + n·2 − 3 spaces + | (for n = 2 the body rows are | |).

Input

One integer n ≥ 2.

Output

2n lines.

Sample 1

Input
2
Output
 *
***
| |
| |

Sample 2

Input
3
Output
  *
 ***
*****
|   |
|   |
|   |
solution.py
Output appears here
Draw a House · Python practice problem · LearnPy Hub