Question: PYTHON QUESTION Write a program that asks the user for a frame character, and then the height and width of a framed box. Then, output

PYTHON QUESTION

Write a program that asks the user for a frame character, and then the height and width of a framed box. Then, output a box of the given size, framed by the given character. Also, output the dimensions of the box centered horizontally and vertically inside the box. In case perfect vertical centering is not possible, dimensions should be output such that there is one less row above the text than it is below. In case perfect horizontal centering is not possible, dimensions should be output such that there is one less space character to the left of the text than it is to the right. Assume that the user inputs valid values for each input: width is a positive integer (7 or higher) and height is a positive integer (4 or higher), and a single character is given for the frame.

For and if loops are not allowed to be used, only string manipulation methods. Expected outputs look like this:

PYTHON QUESTION Write a program that asks the user for a frame

Enter frame character ==> # Height of box ==> 8 7 Width of box ==> 11 11 Box: ########## 11x8 # 15 16 17 # # # 18 # # 19 ###########

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!