Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # input_width = input("Input width: ")
- # input_height = input("Input height: ")
- # width = int(input_width)
- # height = int(input_height)
- # if width < 1 or height < 1:
- # print("you cannot do that")
- # while height > 0:
- # print("*" * width)
- # height -= 1
- i = 1
- while i > 0:
- bintang = 1
- input_level = input("Pyramid level: ")
- if input_level == "stop":
- break
- level = int(input_level)
- if level < 2:
- print("That's not a pyramid!")
- else:
- while level > 0:
- print(" " * (level - 1) + "*" * bintang)
- bintang += 2
- level -= 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement