Skip to content

Instantly share code, notes, and snippets.

@imranrbx
Forked from hahalim/triangle.py
Created December 26, 2018 15:17
Show Gist options
  • Save imranrbx/11d9b4c61053044fdf40c6eead5c107c to your computer and use it in GitHub Desktop.
Save imranrbx/11d9b4c61053044fdf40c6eead5c107c to your computer and use it in GitHub Desktop.
Asterisk triangle
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