1. Engineering
  2. Computer Science
  3. use python write a program that asks the user for...

Question: use python write a program that asks the user for...

Question details

Use PYTHON

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.Enter frame character Height of box >5 Width of box> 7 Box: . 7x5Enter frame character ==> # Height of box => 8 width of box -=> 11 Box: # 11x8 #

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution