"""File: stars8.py Purpose: Use nested for loops to print a right isoceles triangle of asterisks. This version uses a function to print a row of asterisks. It prints the triangle "upside down". Run: python stars8.py Input: Number of rows of asterisks Output: Triangle of asterisks """ def print_row(col_count): for col in range(col_count): print "*", print def print_rect(leg_len): for row in range(leg_len): row_len = leg_len - row print_row(row_len) leg_len = int(raw_input("How long are the legs of the triangle?\n ")) print_rect(leg_len) print "Bye!"