This progran will output a parallelogram. How long do you want each side to be? 5 Please enter the character you vant it to be made of: ..... This progran will output a parallelogram. How long do you want each side to be? 8 Please enter the character you vant it to be made of: 00 00 0000 00000 0000 00
Use Python to write a
Hint: think of this as a program to output two triangles, one above the other (the longest horizontal line is the border between the triangles).
Should have:
1. Your program must work with any length greater than 1.
2. Your program must use the character the user inputs to draw the parallelogram.
3. Your program must use a main() function (no global variables or global code other than a call to main within an if-statement)
4. Your program must also use the following function:
def repeatChar(numRepeats, outputChar):
'''
output the outputChar numRepeats times
'''
for colNo in range(numRepeats):
print(outputChar, end='')
Trending now
This is a popular solution!
Step by step
Solved in 6 steps with 3 images