Python please: Write a program that creates an upward-pointing arrow. Choose 2 input characters: one for the arrow's body and one for the arrow's head, then print an upward-pointing arrow. For example, if the input is * - the output is - --- ----- *** *** *** Note: There are two spaces preceding row one (the tip of the arrow). There is one space preceding row two. There are no spaces preceding row 3. There is one space preceding each of rows 4, 5, and 6 (the body of the arrow).

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 22PE
icon
Related questions
icon
Concept explainers
Question

Python please:

Write a program that creates an upward-pointing arrow.

Choose 2 input characters: one for the arrow's body and one for the arrow's head, then print an upward-pointing arrow.

For example, if the input is

* -

the output is

-
---
-----
***
***
***

Note: There are two spaces preceding row one (the tip of the arrow). There is one space preceding row two. There are no spaces preceding row 3. There is one space preceding each of rows 4, 5, and 6 (the body of the arrow).

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Operators
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr