Code:
def print_row(col_count):
for col in range(col_count):
print "*",
print
def print_rect(act_len):
for row in range(act_len):
print_row(row)
leg_len = int(raw_input("How long are the legs of the triangle?\n"))
act_len = leg_len +1
print_rect(act_len)
print "Bye!"
5
*
* *
* * *
* * * *
* * * * *
Bye!
So above is the program I have so far which gets the legs of the triangle and prints it right side up. Any helpful hints on how to turn the triangle upside down would be much appreciated. Thanks.
Comment