1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
NISA [10]
3 years ago
5

python This program outputs a downwards facing arrow composed of a rectangle and a right triangle. The arrow dimensions are defi

ned 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)

Computers and Technology
2 answers:
bulgar [2K]3 years ago
7 0

Answer:

See explaination for code

Explanation:

arrow_base_height = int(input('Enter arrow base height:\n'))

arrow_base_width = int(input('Enter arrow base width:\n'))

arrow_head_width = arrow_base_width

while arrow_head_width <= arrow_base_width:

arrow_head_width = int(input('Enter arrow head width:\n'))

print()

for i in range(arrow_base_height):

for j in range(arrow_base_width):

print('*', end='')

print()

for i in range(arrow_head_width):

for j in range(arrow_head_width-i):

print('*', end='')

print()

riadik2000 [5.3K]3 years ago
5 0

Answer:

Check the explanation

Explanation:

arrow_base_height = int(input('Enter arrow base height:\n'))

arrow_base_width = int(input('Enter arrow base width:\n'))

arrow_head_width = arrow_base_width

while arrow_head_width <= arrow_base_width:

   arrow_head_width = int(input('Enter arrow head width:\n'))

print()

for i in range(arrow_base_height):

   for j in range(arrow_base_width):

       print('*', end='')

   print()

for i in range(arrow_head_width):

   for j in range(arrow_head_width-i):

       print('*', end='')

   print()

Kindly check the code output below.

You might be interested in
Slide rule was the first mechanical calculator. true or false​
drek231 [11]

Answer:

False. Pascal's calculator was the first mechanical calculator invented by Blaise Pascal in the mid 17th century.

7 0
3 years ago
Read 2 more answers
Ugh these are hard questions
SVEN [57.7K]
9 is B, and 10 is D I think ... brainliest pls
8 0
3 years ago
Which of the following would you classify as workplace violence? A. A co-worker tells you that you’ve got a great body and shoul
aev [14]
I believe it should be C, since it has the most immediate threat to your safety. 
8 0
3 years ago
Read 2 more answers
Some Web sites impose certain rules for passwords. Write a function that checkswhether a string is a valid password. Suppose the
Levart [38]

Answer:

def check_password(pwd):

   c=0

   d=0

   for i in pwd:

       if (i>='a' and i<='z') or (i>='A' and i<='Z'):

           c+=1

       elif i>='0' and i<='9':

           d+=1

           c+=1

   if len(pwd)==c and d>=2 and len(pwd)>=8:

       print("valid password")

   else:

       print("Invalid password")

 

ps=input("Enter password for checking : ")

check_password(ps)

Explanation:

  • Loop through the password and check if it contains any alphabet.
  • Increment the counter if it contains any alphabet.
  • If it contains a number, increment both c and d variables.
  • Finally display the relevant message.
6 0
3 years ago
É correto afirmar que:
Andrew [12]
Is this French. Can u translate into english
8 0
3 years ago
Other questions:
  • To execute a prepared SQL statement, you can use the _______ and execute methods of the PDOStatement object to set parameter val
    9·1 answer
  • What are three special purpose devices you might find in a data center and what do they do?
    10·1 answer
  • What process combines data from a list with the content of a document to provide personalized documents?
    10·1 answer
  • Need help with this programming question plz!
    11·1 answer
  • Does anybody know how to do 6.3 code practice on edhesive. NEED ASAP!!!​
    14·1 answer
  • Ns.office.com/Pages/ResponsePage.aspx?id=bd8
    9·2 answers
  • I used the Pearson correlation coefficient for my study to test the correlation and how strong is the relationship between two v
    10·2 answers
  • Discuss the factors which cause imbalance in the environment.
    8·1 answer
  • An organized file title helps save time locating files, communicates professionalism, and lets us know the file is most likely N
    10·1 answer
  • Pls help!!
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!