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]
2 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]2 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
What does your digital footprint say about you? Does your digital footprint
faust18 [17]
Your digital footprint says a lot about you. It represents your difference from everyone else and that you can’t be exactly like someone else. Your digital footprint also shows that there is one part of you that stays true to itself and never changes. It aligns with a purpose for almost everyone. That purpose is to be yourself because no matter how hard you try to be like someone else, something will always remain true to the real you.

Hope this helps. If this isn’t the type of answer you were looking for, I apologize.
7 0
3 years ago
Jennifer has written a short story for children. What should be her last step before she submits the story for publication?
SSSSS [86.1K]

Answer:

What is the choice of being answer c?

6 0
3 years ago
Which service risks our every move and routine being tracked?
lina2011 [118]
<h3>✽ - - - - - - - - - - - - - - - ~<u>Hello There</u>!~ - - - - - - - - - - - - - - - ✽</h3>

➷ Geo tagging

➶ Hope This Helps You!

➶ Good Luck (:

➶ Have A Great Day ^-^

↬ ʜᴀɴɴᴀʜ ♡

6 0
3 years ago
When you log into quickbooks online account whose books can you directly access and manage?
MArishka [77]

Answer: your books and the ones you are given access to.

Explanation: quickbooks goes from day to day bookkeeping to month and year end financial reports and tax filing. businesses use to manage daily sales and expenses and also keep track of daily transactions. They can involve or outsource bookkeepers or choose to run in-house operations. In doing this they would have access to all their books or decide to give virtual access to their outsourced bookkeeper/accountant. Quickbooks has multiple features concerning user access and privacy. A quick books user, in this case the business, can restrict access for each user it decides to add. The user can decide to give free access to all books or decide to restrict to a few files. Example, the business may add an accountant as one of its users and decide to restrict the accountant to its payroll files, depending on the agreement.

3 0
3 years ago
Convert binary number 11101111.10111 to decimal
Alekssandra [29.7K]

Answer:

N_{10}=239.71875

Explanation:

In order to obtain the decimal number we have to use the next formula:

N_(10)=d*2^{(i)}\\where:\\N=real number\\d=digit\\i=position

(The position to the right of the decimal point we will take it as negative)

Using the formula we have:

N_{10}=(1*2^7+1*2^6+1*2^5+0*2^4+1*2^3+1*2^2+1*2^1+1*2^0+1*2^{-1}+0*2^{-2}+1*2^{-3}+1*2^{-4}+1*2^{-5})

N_{10}=239.71875

7 0
3 years ago
Other questions:
  • ________ is digital textual information that can be stored, manipulated, and transmitted by electronic devices.
    7·1 answer
  • Universal Containers are using Salesforce for Order Management and has integrated with an in-house ERP system for order fulfilme
    5·1 answer
  • What option is used to combine several objects so that they can be treated as a single unit
    6·1 answer
  • When planning a backup strategy, ideally one needs to prioritize important data and only back up what is absolutely necessary fo
    15·1 answer
  • Greg is the network administrator for a large stadium that hosts many events throughout the course of the year. They equip usher
    7·1 answer
  • Sequential codes may be used to represent complex items or events involving two or more pieces of related data.
    7·1 answer
  • Which of the following are characteristics of global variables? Check all that apply.
    5·2 answers
  • There are many apps that help find you cheaper gas. If the cost of a gallon of regular gas is $3 at one station and $3.50 at ano
    15·1 answer
  • Anyone on ps4 willing to trade me a fennec or McClaren on rocket league?
    6·2 answers
  • besides entering a url to go directly to a website, what else can you enter in a browser address bar to explore the internet?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!