Write a program that behaves as shown below (on Linux):
[cpersiko@fog cs110a]$ python3 parallelogramFunction.py.txt This program will output a parallelogram. How long do you want each side to be? 5 Please enter the character you want it to be made of: * * ** *** **** ***** **** *** ** * [cpersiko@fog cs110a]$ python3 parallelogramFunction.py.txt This program will output a parallelogram. How long do you want each side to be? 8 Please enter the character you want it to be made of: @ @ @@ @@@ @@@@ @@@@@ @@@@@@ @@@@@@@ @@@@@@@@ @@@@@@@ @@@@@@ @@@@@ @@@@ @@@ @@ @ [cpersiko@fog cs110a]$
def repeatChar(numRepeats, outputChar): ''' output the outputChar numRepeats times ''' for colNo in range(numRepeats): print(outputChar, end='')
[cpersiko@fog cs110a]$ python3 parallelogramExtra.py.txt This program will output a parallelogram. How long do you want each side to be? 6 Please enter the character you want it to be made of: @ @ @@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @@ @ [cpersiko@fog cs110a]$ python3 parallelogramExtra.py.txt This program will output a parallelogram. How long do you want each side to be? 9 Please enter the character you want it to be made of: * * ** * * * * * * * * * * * * * * * * * * * * * * * * * * ** * [cpersiko@fog cs110a]$