Add exercise
This commit is contained in:
parent
cc7533e152
commit
458c2de38b
14
Exercise 3/11 - Doble lokker/11b.py
Normal file
14
Exercise 3/11 - Doble lokker/11b.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
def numberPyramid(length):
|
||||||
|
for i in range(length):
|
||||||
|
print('X', ' ' * i + 'X')
|
||||||
|
|
||||||
|
|
||||||
|
def numberPyramidDoubleLoop(length):
|
||||||
|
for i in range(length):
|
||||||
|
space = ''.join([' ' for _ in range(i)])
|
||||||
|
print('X', space + 'X')
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
n = int(input('n: '))
|
||||||
|
numberPyramidDoubleLoop(n)
|
Loading…
Reference in New Issue
Block a user