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
Illusion [34]
3 years ago
12

Many documents use a specific format for a person's name. Write a program whose input is: firstName middleName lastName and whos

e output is: lastName, firstInitial.middleInitial. Ex: If the input is: Pat Silly Doe the output is: Doe, P.S. If the input has the form: firstName lastName the output is______________.
Computers and Technology
1 answer:
goblinko [34]3 years ago
6 0

Answer:

The solution code is written in Python:

  1. name = input("Enter your name: ")
  2. name_components = name.split(" ")
  3. first_name = name_components[0]
  4. middle_name = name_components[1]
  5. last_name = name_components[2]
  6. print(last_name + ", " + first_name[0] + "." + middle_name[0])

Explanation:

Firstly, prompt user to enter name (Line 1).

Next, use the string <em>split()</em> method and use space " " as separator to split the input string into individual component, first name, middle name, last name and assign to variable <em>first_name, middle_name </em>and<em> last_name </em>(Line 5-7).

Display the output as required by the question.

You might be interested in
What two devices in a computer should be considered "black boxes," and should never be opened due to risks involving charged cap
NNADVOKAT [17]

The two devices in a computer that should be considered "black boxes," and should never be opened due to risks involving charged capacitors are MONITOR and POWER SUPPLY.

Explanation:

  • Physical contact or close proximity to the open power supply caused a discharge from the capacitor that resulted in an electric shock. Capacitors can discharge current even when not energized because they hold a charge for some time after the power is turned off.
  • To do harm to your body, the voltage across the capacitor's terminals must be high enough to cause a harmful effect on you. There are no hard rules for at what voltage things become harmful, but a common 'rule of thumb' is that DC up to 48 Volt is considered low voltage. So a capacitor charged to a voltage below 48 V is fairly safe.
  • A charged capacitor can be very dangerous, so it's important that you avoid coming into contact with the terminals at all times.
3 0
3 years ago
Which of the following helps create a positive community?
Lera25 [3.4K]

Answer: D.) all of the above

Explanation: By doing all three of these it makes almost everyone in the community is happier and more positive which is better than the bully's & people who don't speak up feel less entitled, it achieves the goal.

5 0
3 years ago
Some file formats are specific to the program that uses them and the operating system on which they are used. True or False
mina [271]

Answer:

true

Explanation:

certain file formats can only be used to it's own operating system

5 0
4 years ago
Read 2 more answers
A ____ is a software program that is designed to cause damage to a computer or perform some other malicious act.
Dafna11 [192]
Computer virus, a software program that is designed to cause damage to the computer system or perform some other
malicious act
5 0
2 years ago
Dov'è il mio formaggio
fredd [130]

Answer:

non lo so, mi spiace

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • he wide range of materials used to create the Buk (mask) of the Torres Strait has been interpreted as evidence of the islanders'
    5·1 answer
  • What is meant by Angular 4?
    15·2 answers
  • The BIOS feature that enables a hard drive to read or write several sectors at a time is called what?
    5·1 answer
  • 11. The golden rule of safe driving is: A. Always drive at the posted speed limit B. Never drive while physically or mentally im
    15·1 answer
  • If you want to prioritize downloads of your mobile app instead of visits to your mobile site, you should: a) add a sitelink exte
    10·1 answer
  • Do you believe that technology has indeed flattened the world in terms of providing
    8·1 answer
  • If a variable uses more than one byte of memory, for pointer purposes its address is: Group of answer choices the address of the
    12·1 answer
  • Reverse Word Order: Write a program that reverses the order of the words in a given sentence. This program requires reversing th
    15·1 answer
  • Overview of your opinion of Digital Etiquette
    10·1 answer
  • What does ADAC mean <br> pls answer quickly i will mrk brainliest
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!