Created
March 30, 2017 20:42
-
-
Save hector117/2b90d9beb5a86dcf6290fb2dfcbe1a2a to your computer and use it in GitHub Desktop.
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
def triangulo(t): | |
z = "" | |
a = 0 | |
n = t | |
while t>0: | |
l.append(t) | |
t = t - 1 | |
pass | |
for element in l: | |
a = a + 1 | |
z = a * "T" | |
print (z) | |
a = n | |
for element in l: | |
a = a - 1 | |
z = a * "T" | |
print(z) | |
#main program below | |
print("Problema 2 (Examen)") | |
l = [] | |
t = int(input("Ingresa un número")) | |
triangulo(t) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment