blob: 07fb1c547c18c9b4b900e1bd6f350c8324ffa0a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# import get_int
# get input using get_int
# make sure the input is between 1 and 8
# print the pyramids
# for i in range(input - 1):
# print(" " * (input - i - 1), "#" * i + 1)
from cs50 import get_int
size = 16
while (size < 1) and (size > 8):
size = get_int("Height: ")
for i in range(size - 1):
print(" " * (size - i - 1), "#" * (i + 1), "", "#" * (i + 1), " " * (size - i - 1))
|