Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Database Systems For Integration Of Media And User Environments 98

Authors: Yahiko Kambayashi, Akifumi Makinouchi, Shunsuke Uemura, Katsumi Tanaka, Yoshifumi Masunaga

1st Edition

9810234368, 978-9810234362

More Books

Students also viewed these Databases questions

Question

4. Identify the challenges facing todays organizations

Answered: 1 week ago