In: Computer Science
def draw_rectangle(height, width, char): """ ------------------------------------------------------- Prints a rectangle of height and width characters using the char character. Use: draw_rectangle(height, width, char) ------------------------------------------------------- Parameters: height - number of characters high (int > 0) width - number of characters wide (int > 0) char - the character to draw with (str, len() == 1) Returns: None ------------------------------------------------------ """
Enter height in characters: 3
Enter width in characters: 12
Enter the draw character: #
############
############
############
here is the code
#function defination
def draw_rectangle(height,width,char):
for i in range(height):
for j in
range(width):
print(char,end="")
print()
#take user input
height=int(input("Enter height in character:"))
width=int(input("Enter width in character:"))
char=input("Enter the draw character:")
#call the function
draw_rectangle(height,width,char)