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
What are the main components of a desktop PC and briefly describe their purposes.​
Norma-Jean [14]

Answer:

8 Standard Computer Components and What They Do

Explanation:

Motherboard. The motherboard is an important computer component because it’s what everything else connects to!

Power Supply. True to its name, the power supply powers all other components of the machine.

Central Processing Unit (CPU)

Random-access Memory (RAM)

Hard Disk Drive / Solid State Drive.

Video Card.

Optical Drives.

6 0
3 years ago
Which feature was the first app available on a cell phone? A. Game B.contact list C.email D.ringtone
Oduvanchick [21]

Before cellphones are able to be used to browse the internet, play games, record videos and take photos, its main purpose is similar to a telephone, albeit it is more portable. Early cellphones would not have games for you to play, not would it have emails for you to check, read, and reply to. Though ringtones might seem as an acceptable option, early cellphones would also have many selections or even any for you to choose.

Thus, the best option would be (B) contact list, which is necessary for a cellphone to have since the owner would need the number to be able to make a call.

8 0
3 years ago
Ano ang ibig sabihin ng tanka<br>​
Marina86 [1]

Answer:

Ang tanka ay nabuo noong ika walong siglo. Ito ay isang maikling awitin, na puno ng damdamin at nagpapahayag ng isang emosyon at kaisipan. Ang paksa ay karaniwang pag-asa, pagbabago at pag-ibig. Ito ay may 31 na pantig. Ang Tanka ay anyo ng tula na pinahahalagahan ng panitikang Hapon. Ang pinakaunang TANKA ay kasama sa kalipunan ng mga tula na tinawag na MANYOSHU o COLLECTION OF TEN THOUSAND LEAVES.

Explanation:

basta yan na

3 0
3 years ago
Henry must choose which type of smart speaker to use in his home. He asked you to help him decide which one will best suit his n
Vikentia [17]

Answer:

Home

Explanation:

When buying a smart speaker, you must be sure which voice assistant you would prefer. If you want to be connected with your Amazon account, then you can get Echo. If you prefer to be connected to your Google Account and want Google Assistant, then you would prefer Home. If you fancy Microsoft, you buy Cortana, and if you love Apple, you buy Homepod. Since Henry wants his smart speaker connected to his Google Account, then he has to buy the Google Home smart speaker.

8 0
3 years ago
Angela works for an identity protection company that maintains large amounts of sensitive customer information such as usernames
nata0808 [166]

Answer:the correct answer is the c)

An insider

Explanation:

Insiders that perform attacks have a distinct advantage over external attackers because they have authorized system access and also may be familiar with network architecture and system policies/procedures.

8 0
3 years ago
Other questions:
  • Write a program that prints to the screen all the ASCII characters from 33 to 126. 33! 34''
    12·1 answer
  • Most licensing agencies offer an orientation meeting for applicants who want to obtain licensing for a child care facility or a
    12·2 answers
  • Which commonly used animation effect makes text on a slide appear in the presentation?
    9·1 answer
  • HELP WILL MARK BRAINLIEST!!!!!!!!!!!!!!!!!<br> How do you take a screenshot on Windows 7?
    15·2 answers
  • The Letter keys are organized into three rows. Which of the following is not a letter key row?
    8·2 answers
  • Create an array of doubles to contain 5 values Prompt the user to enter 5 values that will be stored in the array. These values
    8·1 answer
  • Which two things can a user view in the Reading pane?
    6·2 answers
  • What will the computer do in response to a line of code reading # name = input("What is your name?")
    7·1 answer
  • 6. kinukuha nito ang kabuuang bilang ng mga numerical na datos sa mga piniling cells
    12·1 answer
  • When a device or service causes the system to hang during a normal boot, boot into __________ and disable the device or service
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!