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
Ray Of Light [21]
3 years ago
15

Python 3.12 LAB: Input and formatted output: Right-facing arrow Given input characters for an arrowhead and arrow body, print a

right-facing arrow. Ex: If the input is: * # Then the output is: # ******## ******### ******## #
Computers and Technology
1 answer:
Sloan [31]3 years ago
3 0

The code below prints the required shape using the string manipulations in Python.

In Python, if we multiply a character with a number, we get that character side by side that number of times.

For example: 6 * '#' would give us → ######

Also, we can use + sign to concatenate the strings.

For example: 'hi' + ' there' would give us → hi there

We use this approaches to print the required shape line by line.

Comments are used to explain each line.

The output is attached as an image.

#get the characters from the user

base_char = input()

head_char = input()

#set first row with 6 spaces and 1 head_char

row1 = 6 * ' ' + head_char

#set second row with 6 base_chars and 2 head_chars

row2 = 6 * base_char + 2 * head_char

#set third row with row2 and 1 head_char

row3 = row2 + head_char

#print the rows to draw the shape

print(row1)

print(row2)

print(row3)

print(row2)

print(row1)

You may see another question at:

brainly.com/question/22101725

You might be interested in
Which type of password would be considered secure
max2010maxim [7]
Try using at least one capital letter and multiple number and symbols
Example: [email protected]#3
5 0
4 years ago
Read 2 more answers
Please explain why an operating system makes a great attack target.​
BartSMP [9]
The operating system is the fundamental controller of all system resources
Operating system popularity is one major reason why hackers attack
Window is a big target because it powers the vast majority of the world’s desktop computers and laptops.
To steal personal and protected health information
To steal user credit card numbers and other financial data
To harm the system or disrupt business operations of any organization
To gain competitive edge over opponents
To spoil the reputation of an organization

If you want answer to question 19, put a Thanks and comment that you want answer to question 19
8 0
3 years ago
What are 6 steps to take to figure out what's wrong with your computer?
lisabon 2012 [21]

Answer

  1. located the problem
  2. Go to system settings
  3. Try to uninstall and install the program
  4. Try troubleshooting the program
  5. Try contacting the device admin
  6. Read the user Manuel before try to do anything on the system
6 0
3 years ago
"In a web app, where is data usually stored? A. Mobile network B. Application storage C. Local computer D. Cloud storage"
ollegr [7]

Answer:

The answer is "Option C".

Explanation:

The local computer also refers to locally, it is a device, that is used by LAN. It is also called as a remote computer, in which all the data is stored in the main computer and accessible by protected password, and certain choices were wrong, which can be described as follows:

  • In option A, It is used in digital communication.
  • In option B, It is used in androids.
  • In option D, It is used to provides web services.
6 0
3 years ago
The following outline is used to plan a program. What is the name for this type of plan?
vladimir1956 [14]
Pseudocode is the answer
7 0
3 years ago
Read 2 more answers
Other questions:
  • Thomas Hill claims that a fruitful way to think about the badness of destroying the environment is
    15·1 answer
  • Your dad just purchased a new desktop with Windows 8 Professional. He is calling you, informing you that he is unable to remote
    9·1 answer
  • GenXTech is a growing company that develops gaming applications for military simulations and commercial clients. As part of its
    9·1 answer
  • What is the voltage drop across R4 in the diagram shown above?
    13·1 answer
  • Online Book Merchants offers premium customers 1 free book with every purchase of 5 or more books and offers 2 free books with e
    11·1 answer
  • What are some (free) good animation websites (for PC/Microsoft) for a short informational video about homelessness?
    15·1 answer
  • . Write a toString method for this class. The method should return a string containing the base, height and area of the triangle
    10·1 answer
  • True or false a computer with a high efficiency rating should stay cooler than one with a low effiency rating
    9·1 answer
  • What is considered appropriate dress for men and women in the workplace? Select all that apply.
    6·2 answers
  • )
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!