File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Replace all ______ with rjust, ljust or center.
2
+
3
+ thickness = int (input ()) # This must be an odd number
4
+ c = 'H'
5
+
6
+ # Top Cone
7
+ for i in range (thickness ):
8
+ print ((c * i ).rjust (thickness - 1 ) + c + (c * i ).ljust (thickness - 1 ))
9
+
10
+ # Top Pillars
11
+ for i in range (thickness + 1 ):
12
+ print ((c * thickness ).center (thickness * 2 ) + (c * thickness ).center (thickness * 6 ))
13
+
14
+ # Middle Belt
15
+ for i in range ((thickness + 1 ) // 2 ):
16
+ print ((c * thickness * 5 ).center (thickness * 6 ))
17
+
18
+ # Bottom Pillars
19
+ for i in range (thickness + 1 ):
20
+ print ((c * thickness ).center (thickness * 2 ) + (c * thickness ).center (thickness * 6 ))
21
+
22
+ # Bottom Cone
23
+ for i in range (thickness ):
24
+ print (((c * (thickness - i - 1 )).rjust (thickness ) + c + (c * (thickness - i - 1 )).ljust (thickness )).rjust (thickness * 6 ))
You can’t perform that action at this time.
0 commit comments