# Arup Guha
# 12/8/2020
# Solution to COP 2930 Final Exam Part B Problem 2

# Wrote this for testing purposes.
def printLine(ch, n):
    print(ch*n)
    
def printAltTri(numRows, ch):

    # Keep track of each row number with i.
    for i in range(1, numRows+1):

        # This is what we want on this row.
        printLine(ch, i)

        # This always toggles the character as desired.
        if ch == '*':
            ch = '='
        else:
            ch = '*'

# Covers all even/odd and */= combos.
printAltTri(5, '*')
printAltTri(12, '=')
printAltTri(9, '=')
printAltTri(8, '*')
