Created
March 24, 2015 18:24
-
-
Save gilrg18/31ae5c602f02f0cbf4ef to your computer and use it in GitHub Desktop.
Triangles
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
#Gilberto Rogel García A01630171 | |
def triangles(size): | |
for r in range(1,size+1): | |
for c in range(1,r+1): | |
print("t", end="") | |
print() | |
for r in range(size-1,0,-1): | |
for c in range(1,r+1): | |
print("t",end="") | |
print() | |
print("This program makes a triangle using your number as the middle length") | |
size=int(input("Give me a number:")) | |
t=triangles(size) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment