Last active
December 27, 2018 00:04
-
-
Save hahalim/fe106e52f2ae6a2ff7388a210edafb2a to your computer and use it in GitHub Desktop.
Asterisk triangle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chance = "" | |
while(chance!="no"): | |
try: | |
num = int(input("Enter the number of rows ")) | |
for i in range(1, num+1): | |
for j in range(num-i, num): | |
print("*", end="") | |
print() | |
except ValueError: | |
print("Enter the valid number") | |
chance = input("press any key to run the program again type no to exit [yes]/no ") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment