Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2 2 . 1 2 LAB * : Program: Drawing a half arrow This program outputs a downwards facing arrow composed of a rectangle and

22.12 LAB*: Program: Drawing a half arrow
This program outputs a downwards facing arrow composed of a rectangle and a right triangle. The arrow dimensions are defined by user specified arrow base height, arrow base width, and arrow head width.
(1) Modify the given program to use a loop to output an arrow base of height arrow_base_height. (1 pt)
(2) Modify the given program to use a loop to output an arrow base of width arrow_base_width. (1 pt)
(3) Modify the given program to use a loop to output an arrow head of width arrow_head_width. (2 pts)
(4) Modify the given program to only accept an arrow head width that is larger than the arrow base width. Use a loop to continue prompting the user for an arrow head width until the value is larger than the arrow base width. (1 pt)
while arrow_head_width = arrow_base_width:
arrow_head_width = int(input('Enter arrow head width:
'))
Example output for arrow_base_height =5, arrow_base_width =2, and arrow_head_width =4:
Enter arrow base height:
5
Enter arrow base width:
2
Enter arrow head width:
4
**
**
**
**
**
****
***
**
*
image text in transcribed

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_2

Step: 3

blur-text-image_3

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

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

Summarize the impact of a termination on the employee.

Answered: 1 week ago