-
-
Save imranrbx/11d9b4c61053044fdf40c6eead5c107c to your computer and use it in GitHub Desktop.
Asterisk triangle
This file contains hidden or 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
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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment